3 ms·
No, on modern 64-bit processors it's definitely more efficient and faster than the loop variant. It's measurable. The author's disclaimer that it isn't faster i
by acqq 11y ago
No, on modern 64-bit processors it's definitely more efficient and faster than the loop variant. It's measurable. The author's disclaimer that it isn't faster is actually valid only for old or small processors.
See cnvogel's attempt to measure it:
https://news.ycombinator.com/item?id=10513767 https://news.ycombinator.com/item?id=10513767
I also haven't accused anybody anything here.
- deelowe 11y agoYou just won't give up will you? Do you post similar rants to mechanical engineers building rube goldberg machines and electrical engineers building impractical extremely high voltage transformers?
- acqq 11y agoCan you imagine that there are people who actually program on such a low level that they actually care about that kind of functions, constants and the number of T states that the resulting assembly code takes? I'm one of those. If these aspects aren't relevant to you please allow me to address them. The article author actually engineered an effective function for spreading out bits to bytes. I invite you to read the comments here that are actually mine and what's in them.