2 Comments
May 14, 2022Liked by Taras Tsugrii

it's funny. Initially I was skimming fast and thought you'll be using an array for the loop. I did not realize that it was a vector. Interesting finds though. There is a limit where the compile/optimizer(?) would say - I'm not doing this nice optimization anymore and falling back to regular allocation.

So in the last snippet, gcc is using jne. Is this worse? in terms of the cpu branch predictor?

Expand full comment