4 ms·
Well, yeah, maybe if you are writing ray tracers. The focus of Delphi was object oriented data structures (especially for UIs) and there isn't a lot that the c
by nrdvana 5y ago
Well, yeah, maybe if you are writing ray tracers. The focus of Delphi was object oriented data structures (especially for UIs) and there isn't a lot that the compiler can optimize when the function is packed full of method calls, which is why UI in Delphi was nearly identical performance to one in C++. If you want vector math to run fast, those C++ compiler optimizations are a lot more important.
Just to clarify, my main point was the speed at which it would compile the code, which was an order of magnitude faster than anything else.
- badsectoracula 5y agoFWIW what i wanted to point out was that even for something as a raytracer Delphi 2 wasn't really that much slower :-P. And as i mention on the site, if i was to use that on retro hardware i'd rather use Delphi 2 and write better code (IMO a good profiler is much more important than a good optimizer when it comes to writing fast code anyway) instead of VC++6 because Delphi 2 is much faster to use. In practice it'd be fast enough anyway. Sadly i do not have anything fancy made with Delphi 2 specifically, but in this video[0] i play a software rendering 3D game i made for an MSDOS game jam last year (it also works on Windows 95[1]) which was made in Free Pascal that from the table i linked at produces executables with around the same performance as Delphi 2 (at least for the 32bit version without using any modern CPU instructions). The majority of the time is spent in the rasterizer, the innermost bits of which are written in assembly, so even if Delphi 2 was much worse at codegen it wouldn't matter much anyway. (sometimes i do consider out of curiosity to convert the code to be compatible with Delphi 2, but it relies on language features like generics for the collections and on some FPC-specific bits for object de/serialization that would make the conversion non-trivial) [0] https://www.youtube.com/watch?v=pk6pu4iRb5c https://www.youtube.com/watch?v=pk6pu4iRb5c [1] https://i.imgur.com/iOhcUtf.png https://i.imgur.com/iOhcUtf.png