Fix unsigned and signed integer compare

This commit is contained in:
Igor Canadi 2014-04-29 12:29:22 -07:00
parent 76c3dbf5b5
commit d0b006ab13

View File

@ -18,42 +18,42 @@ BENCHMARK(insertFrontVector) {
BENCHMARK_RELATIVE(insertBackVector) {
std::vector<int> v;
for (int i = 0; i < 100; i++) {
for (size_t i = 0; i < 100; i++) {
v.insert(v.end(), i);
}
}
BENCHMARK_N(insertFrontVector_n, n) {
std::vector<int> v;
for (int i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++) {
v.insert(v.begin(), i);
}
}
BENCHMARK_RELATIVE_N(insertBackVector_n, n) {
std::vector<int> v;
for (int i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++) {
v.insert(v.end(), i);
}
}
BENCHMARK_N(insertFrontEnd_n, n) {
std::vector<int> v;
for (int i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++) {
v.insert(v.begin(), i);
}
for (int i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++) {
v.insert(v.end(), i);
}
}
BENCHMARK_RELATIVE_N(insertFrontEndSuspend_n, n) {
std::vector<int> v;
for (int i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++) {
v.insert(v.begin(), i);
}
BENCHMARK_SUSPEND {
for (int i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++) {
v.insert(v.end(), i);
}
}