3 ms·
> It's faster than scripting languages, but generally slower than AOT compiled languages, even those with GC. Not sure about FPC, but Delphi 7 was on par with
by yeputons 3y ago
> It's faster than scripting languages, but generally slower than AOT compiled languages, even those with GC.
Not sure about FPC, but Delphi 7 was on par with C++ ten years ago in competitive programming, that is about 2-3 times faster than Java. By competitive programming I mean very short (1-3 seconds per execution max, so any JIT is at disadvantage), CPU-bound single-threaded heavily algorithmic computation on mostly default compiler/runtime settings with no external libraries or ability to tweak. The common knowledge was: you either use C++/Pascal, or use Java and occasionally rewrite your 200-300 line solution to C++ if you get "time limit exceeded" error, and it passes with flying colors.
- slt2021 3y agoreasons why Delphi was/is a strong option for CP: 1. Fast compilation enables edit-compile-run workflow. Fast iteration enables solving CP problems faster. 2. Native dynamic arrays, native String type 3. Easy to learn language for middle/high schoolers. 4. Usefulness for outside CP, for example I created GUI programs in Delphi for clients and earned $$$ while in 8th grade, right after I was done with competition season.