mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@15502 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
138c04e7cf
commit
759dcc933b
1 changed files with 9 additions and 5 deletions
|
|
@ -19,6 +19,13 @@ CONSOLE_APP_MAIN
|
||||||
RTIMING("std::sort std::vector<std::string>");
|
RTIMING("std::sort std::vector<std::string>");
|
||||||
std::sort(x.begin(), x.end());
|
std::sort(x.begin(), x.end());
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
std::vector<std::string> x;
|
||||||
|
for(auto s : w)
|
||||||
|
x.push_back(s.ToStd());
|
||||||
|
RTIMING("std::stable_sort std::vector<std::string>");
|
||||||
|
std::stable_sort(x.begin(), x.end());
|
||||||
|
}
|
||||||
Vector<String> w2 = clone(w);
|
Vector<String> w2 = clone(w);
|
||||||
{
|
{
|
||||||
RTIMING("Sort Vector<String>");
|
RTIMING("Sort Vector<String>");
|
||||||
|
|
@ -29,11 +36,8 @@ CONSOLE_APP_MAIN
|
||||||
if(w2[i] != x[i])
|
if(w2[i] != x[i])
|
||||||
Panic("Failed!");
|
Panic("Failed!");
|
||||||
/* {
|
/* {
|
||||||
std::vector<std::string> x;
|
RTIMING("Sort Vector<String>");
|
||||||
for(auto s : w)
|
Sort(w);
|
||||||
x.push_back(s.ToStd());
|
|
||||||
RTIMING("std::sort std::vector<std::string>");
|
|
||||||
std::stable_sort(x.begin(), x.end());
|
|
||||||
}
|
}
|
||||||
*/ #if 0
|
*/ #if 0
|
||||||
ONCELOCK {
|
ONCELOCK {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue