4 ms·
Probably you are using clang, right? As mentioned, clang does the idiom recognition even at -O2. Try at -O1. If it's still fast at -O1, I guess the libc++ imp
by BeeOnRope 7y ago
Probably you are using clang, right? As mentioned, clang does the idiom recognition even at -O2.
Try at -O1.
If it's still fast at -O1, I guess the libc++ implementation is different (AFAIK clang uses libstdc++ on Linux but libc++ on OSX).