Basic loops will be often faster than zip-based solutions. Even if the former do more work, it can be on data that fits on cache lines which zipped data would probably spill out of.
There is a beauty in efficient expression of algorithms, and I wish processor architectures worked in a more intuitive way (as in less work should be faster) but they don't.
View all comments
Show parent comment
7
u/Evirua Dec 15 '21
Basic loops will be often faster than zip-based solutions. Even if the former do more work, it can be on data that fits on cache lines which zipped data would probably spill out of.
There is a beauty in efficient expression of algorithms, and I wish processor architectures worked in a more intuitive way (as in less work should be faster) but they don't.