3 ms·
Thumbs up, but at least on macOS both is equally fast :-(
by PeterHacker123 7y ago
Thumbs up, but at least on macOS both is equally fast :-(
- BeeOnRope 7y agoProbably 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).