Fix unsigned and signed integer compare
This commit is contained in:
parent
76c3dbf5b5
commit
d0b006ab13
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user