Remix.run Logo
BoorishBears 3 days ago

The compiler would have to determine that these are pure calls which I wouldn't rely on if performance actually matters

I just tested a recent gcc at -O2 with a contrived example using strings in an unordered_set: a look-up always occurs if not relying on short-circuiting

1718627440 3 days ago | parent [-]

True, I missed that the calls likely traverse translation units, because this is not how I write code.