mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:23:07 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
39
sdk/lib/3rdparty/stlport/test/eh/bug.cpp
vendored
Normal file
39
sdk/lib/3rdparty/stlport/test/eh/bug.cpp
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <boost/timer.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
struct compare
|
||||
{
|
||||
bool operator()(int* x, int* y)
|
||||
{ return *x < *y; }
|
||||
|
||||
};
|
||||
|
||||
int main(int argc, char const* const argv[])
|
||||
{
|
||||
std::size_t niters = argc < 2 ? 1000 : boost::lexical_cast<std::size_t>(argv[1]);
|
||||
|
||||
boost::timer t;
|
||||
|
||||
std::vector<int> v;
|
||||
for (int n = 0; n < niters; ++n)
|
||||
{
|
||||
v.insert(v.begin() + v.size()/2, n);
|
||||
}
|
||||
|
||||
std::cout << "vector fill: " << t.elapsed() << std::endl;
|
||||
|
||||
std::multiset<int*,compare> m;
|
||||
for (int n = 0; n < niters; ++n)
|
||||
{
|
||||
m.insert(&v[n]);
|
||||
}
|
||||
std::cout << "map fill 1: " << t.elapsed() << std::endl;
|
||||
for (int n = 0; n < niters; ++n)
|
||||
{
|
||||
m.insert(&v[n]);
|
||||
}
|
||||
std::cout << "map fill 2: " << t.elapsed() << std::endl;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue