24 ms·
This was the best thing from my time at uni. We wrote a compiler, and I made one that, when it met some types of code, would insert highly optimised C. We had a
by Johnny_Brahms 10y ago
This was the best thing from my time at uni. We wrote a compiler, and I made one that, when it met some types of code, would insert highly optimised C. We had a small competition at the end of the year with lots of small stupid benchmarks.
It was self-hosting, and I made it insert the funky code on compile. I also made it do precomputation on most loops.
The benchmarks at the end of the year had very un-even time distribution, and everybody knew that we had done something funny (especially since our recursive slow fibonacci was the fastest by a factor of 8).
We knew we would get caught, but it was funny anyway. Someone else won because their compiler was actually good, but we got a new special "underhanded sneakyness" prize