-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.performance
Description
#include <set>
#include <string>
int f(const std::set<std::string>& s)
{
return s.count("s");
}
libstdc++
Iterations: 100
Instructions: 8100
Total Cycles: 6970
Total uOps: 9700
Dispatch Width: 4
uOps Per Cycle: 1.39
IPC: 1.16
Block RThroughput: 24.3
libc++
Iterations: 100
Instructions: 9500
Total Cycles: 8868
Total uOps: 12300
Dispatch Width: 4
uOps Per Cycle: 1.39
IPC: 1.07
Block RThroughput: 30.8
https://godbolt.org/z/WbGETxbqs
If you use a different type like int
then libc++
is actually faster: https://godbolt.org/z/b9KKnrTjP
Metadata
Metadata
Assignees
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.performance