4 ms·
How many of these are still relevant? x86 has an instruction for crc, bswap, as well as nop now.
by uxcn 11y ago
How many of these are still relevant? x86 has an instruction for crc, bswap, as well as nop now.
- dr_zoidberg 11y agoNow almost every code to be run is cache-bound for performance, not cycle-bound. So this gems, while may still work, may not be the best means to achieve optimal performance. Optimizing cache access is what brings the biggest speedups today -- see for example NumExpr[1]. [1] https://github.com/pydata/numexpr https://github.com/pydata/numexpr
- uxcn 11y agoCache is extremely important, but most of these operate strictly on values in registers. So, losing cycles due to cache misses, latency, contention, etc... isn't a bottleneck. A lot of these are crucial enough that they've been codified in transistors now, and generally can execute in a cycle without consuming extra registers. There are still some very valid bit tricks though.
- dr_zoidberg 11y agoWell I read some and had the impression they were going for speed or low cycle count. Indeed, most surely still work (there doesn't seem to be anything that is processor-specific). Unfortunately my asm is rustier than I thought and I find it quite demanding to read and fully understand them.