4 ms·
Back 20 or more years ago I used to do a lot of rec math competition programming and found that the metrowerks c++ compiler made massively faster programs than
by willvarfar 2y ago
Back 20 or more years ago I used to do a lot of rec math competition programming and found that the metrowerks c++ compiler made massively faster programs than gcc, vsstudio, intel and everything else I tried then.
This seemed to be simply down to variable alignment; the programs took more memory but ran much faster, particularly multi-core (which was still high end then).
And this was on x86 where metrowerks weren't really competing, and was probably accidental. But the programs it compiled were fast.
I'd be surprised if anyone even knew that metrowerks had a c++ compiler on x86 on windows. At the time metrowerks were on the tail end of their domination of mac compilers from before mac ran on x86.
- dan_hawkins 2y agoI was using Metrowerks C++ compiler suite to develop code for Dragonball (68000) embedded system 22 years ago!
- bruce343434 2y agoMemory access patterns are everything. Memory delay is almost always the bottleneck anyway. I have the feeling that more and more this is becoming common knowledge, and techniques like "struct of arrays" are becoming more wide spread and talked about.
- willvarfar 2y agoIs this perhaps why Build Engine used arrays, rather than arrays of struct? Organising things columnwise rather than rowwise, like an OLAP engine? https://fabiensanglard.net/duke3d/code_legacy.php https://fabiensanglard.net/duke3d/code_legacy.php
- TsiCClawOfLight 2y agoYes. We learned that pattern in University, it is usually worth it unless in a high-level language.