6 ms·
bzip2 isn't very large, and they seem to believe they speed that up too. I don't see why this wouldn't speed up small things. Whether it's a big program or a sm
by asfasgasg 8y ago
bzip2 isn't very large, and they seem to believe they speed that up too. I don't see why this wouldn't speed up small things. Whether it's a big program or a small one, it probably has hot code and cold code, and organizing the code in such a way that the hot stuff is all together is likely to help. Same goes for making sure you don't have to take branches, etc.
- rattray 8y agoAh, thanks for the correction. In any case, it seems this is specific to compiled code.
- asfasgasg 8y agox86_64, and some extensions, yes. However, as you may be aware, most interpreted code is hosted by a VM that runs compiled code. :) FB's HHVM is such a one.
- ebikelaw 8y agoOn modern x86_64 implementations tiny changes in code layout can have large effects. There are rampant stories of "load-bearing NOPs" that mysteriously make programs several percent faster. Even experts do not understand these effects. I'd like to hear more about the effect on various programs, not just bzip2.
- sanxiyn 8y agoThere was a published paper in CGO 2011 on load-bearing NOPs by Google. https://ai.google/research/pubs/pub37077 https://ai.google/research/pubs/pub37077