(no title)
Strilanc | 4 months ago
Ah yes, C++, the discerning language.
Iterating over optional does seem syntactically convenient. My main question would be if it guarantees no overhead. For example, is there an additional conditional branch due to the iterator hiding the statically know fact that there's at most one iteration? I don't use C++ for its beauty, I use it for speed.
pbsd|4 months ago
The main difference there seems to be that GCC treats the if() as unlikely to be taken while the for() as likely.
loeg|4 months ago
C++, the language that refused to add `contains()` to maps until, you know, C++20!
nikanj|4 months ago
Absolutely incredible, definitely worth the wait
nzeid|4 months ago