logoalt Hacker News

btdmastertoday at 4:11 PM1 replyview on HN

I see yeah that makes sense. I wanted to highlight that "magic" will, on average, give the optimizer a harder time. Explicit offset loops like that are generally avoided in many C++ styles in favor of iterators.


Replies

delta_p_delta_xtoday at 5:17 PM

Even at a higher level of abstraction, the compiler seems to pull through: https://godbolt.org/z/1nvE34YTe

show 1 reply