Hacker News new | ask | show | jobs
by ecpottinger 1183 days ago
This does far more than I did back in my PET and then Amiga days, but one thing I did was write a multi-pass compiler. Each pass at first found ways to make the come better (usually smaller so it ran faster). Even simple code I wrote could see a 10-20% improvement.

Of-course, this is because the original code was quick and dirty. I wonder what improvement modern compilers could have added.

1 comments

Geez, 25 years ago I was being boggled by how sophisticated was the code generated by the C compiler we shipped at SGI. For the MIPS architecture, as for most contemporary architectures, re-ordering memory accesses to minimize cache misses was FAR more important to execution speed than the specific selection of machine instructions.

Of course for early MIPS there were little things like, don't put a jump in the last word of a 4K page... :-(

6502 also had some "little things". E.g., it's jump indirect didn't work across page boundaries: http://www.6502.org/tutorials/6502opcodes.html#JMP