3 ms·
Indeed, Object Pascal in Delphi 6 had blazing fast compilation (for various reasons not least it's unit system), like click and it runs a half second later on a
by noir_lord 8y ago
Indeed, Object Pascal in Delphi 6 had blazing fast compilation (for various reasons not least it's unit system), like click and it runs a half second later on a 250,000 line codebase.
- pjmlp 8y agoA tradition all the way back to its MS-DOS early life. Turbo Pascal 5.5 had an advertised compilation speed of 34 000 lines/minute, on 1989's hardware. http://edn.embarcadero.com/article/20803 http://edn.embarcadero.com/article/20803 So something like PC 386 running MS-DOS 4.x, real mode with 640KB, eventually 1MB, if making use of highmem. So excuse me for not being that amazed with Go's compilation speed achievements. :)
- jstimpfle 8y agoWhat's the reference speed for golang or generally a quick compiler on contemporary hardware? My own experimental non-optimizing compiler compiles >1M lines per second, and it's not even optimized or multithreaded. Currently quite happy about that :-)
- atombender 8y agoThe original Turbo/Borland Pascal compiler was a single-pass compiler written in assembly. Not sure if they ever rewrote it in a high-level language. The small, simple grammar helped, as did the unit system. With Delphi, linking became the most expensive stage of compilation. Part of being single-pass was it hardly did any optimizations, and of course declaration order was completely rigid. Back in the 1990s there were competing commercial compilers like Stony Brook Pascal that did optimization, and at the time there were optimizers that you could run on the .exe files, but for the most part people stuck to Borland's tools. I spend a good part of the 90s writing fast 2D and 3D graphics stuff, including a commercial game, and performance was never an issue, especially as Object Pascal supported embedding assembly blocks seamlessly into your code.
- pjmlp 8y agoIf I am not mistaken, later versions of Delphi removed the restrictions on declaration order. I am with you on performance for graphics stuff, hence why I never bought into stuff like disabling bounds checking on the whole application is a must for performance.
- atombender 8y agoI stopped using Delphi after version 4, but I was curious, so I did some googling. Looks to me like forward declarations were still needed in Delphi 2010, at least for class declarations: https://stackoverflow.com/questions/2137030/cant-get-a-forward-class-declaration-to-work-in-delphi-2010 https://stackoverflow.com/questions/2137030/cant-get-a-forwa.... Borland's Pascal compilers did have a way to disable bounds checking locally, with a special compiler directive comment: {$R-}. It took effect from where you used it, so you could do: {$R-} for i := 1 to 10 do writeln(myArray[i]); end; {$R+} </nostalgia>
- pjmlp 8y agoYep I used R- a few times, just not everywhere. :) Thanks for googling it.