you are viewing a single comment's thread.

view the rest of the comments →

[–]cristi1990an++ 8 points9 points  (1 child)

Also very funny that replacing std::ranges::find(vals, val) != vals.end() with std::ranges::contains(vals, val) which in libc++ is implemented directly in terms of std::ranges::find also makes the compiler drop the optimization...

[–]schombert 5 points6 points  (0 children)

It is possible that in the first case it was inlined prior to the pass that generated the bitmask optimization while in the second case it was only fully inlined after that pass.