by jonathanstrange · 7y ago · 0 comments
However, it was only fast when I used packages very sparingly. In contrast to the usual advice given in the Ada community, splitting up the implementation into several packages slowed down the main loop tremendously. I suspect this wouldn't happen with whole-program optimization in C, but believe that the version of gcc I was using didn't support that for Ada. Also, my Green Threads were slower than a single thread, no matter which tricks I tried.
It's an abandoned project now, since the accompanying assembler was hacked together in Racket and at some point I simply lost track of what was going on where :O
Optimizing your project: https://www.pegasoft.ca/resources/boblap/7.html
GNAT: Alphabetical list of all switches: https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gnat_ugn/Alphabetic...
https://stackoverflow.com/a/2548425
I tested this recently (Delphi XE6), and it definitely is as-described: you get straight jump instructions with enough case statement branches, and it is very fast.
Barry Kelly worked on the Delphi compiler, and I believe he comments here on Hacker News occasionally.
That's what pretty much any half-decent compiler does nowadays. It'd be much more surprising if it didn't.