|
|
|
|
|
by vintagedave
2 days ago
|
|
Talk author here, hi! Yes, the original compilers were single-pass and very fast. And that does limit optimisations. In the talk I discuss things other languages are doing, including inbuilt SIMD types, where I think runtime speed can be a language design goal. And the Pascal compiler I work on, Oxygene, has had a bunch of runtime performance recently - some via a third party math library, but some via LLVM including even custom passes we built. At the same conference I gave the above talk at, I also gave a talk on optimisation techniques using a Delphi app (a raytracer), ie, very practical, let's spend an hour optimising this code, and at the end after I did everything I thought of, I recompile the Delphi VCL app in Oxygene -- and it's another 2.5x faster. That's on ARM. Other tests have seen much bigger on x64 or x32. I figure performance is like any other industry problem: you can choose which you focus on, not all languages solve everything, but ultimately your language has to have a solution. |
|
Why not both?
Is there any reason that a Pascal compiler couldn't switch to provide more optimized code on demand (multi-pass if necessary) while retaining the fast single pass capability?
Pascal compilers have long offered optimization options but in my experience, the code improvement tends to be mild and fall sort of the mark set by the competition.
If other languages can do better, why can't Pascal? The only reason I can see is lack of effort/interest and the "it's good enough" mentality.