Revert of https://codereview.chromium.org/127223004/
Reason for revert: VS can't comprehend std::vector without exceptions.
R=bsalomon@google.com, caryclark@google.com, mtklein@chromium.org
TBR=bsalomon@google.com, caryclark@google.com, mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/129443002
git-svn-id: http://skia.googlecode.com/svn/trunk@12975 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/StackBench.cpp b/bench/StackBench.cpp
index 43888bd..61af99f 100644
--- a/bench/StackBench.cpp
+++ b/bench/StackBench.cpp
@@ -12,7 +12,6 @@
#include "SkDeque.h"
#include "SkTArray.h"
#include "SkTDArray.h"
-#include <vector>
// This file has several benchmarks using various data structures to do stack-like things:
// - push
@@ -79,16 +78,6 @@
}
}
-BENCH(vector_Serial) {
- std::vector<int> s;
- for (int i = 0; i < K; i++) s.push_back(i);
-
- volatile int junk = 0;
- for (int j = 0; j < loops; j++) {
- for (size_t i = 0; i < s.size(); i++) junk += s[i];
- }
-}
-
// Add K items, then randomly access them many times.
BENCH(TArray_RandomAccess) {
@@ -113,17 +102,6 @@
}
}
-BENCH(vector_RandomAccess) {
- std::vector<int> s;
- for (int i = 0; i < K; i++) s.push_back(i);
-
- SkRandom rand;
- volatile int junk = 0;
- for (int i = 0; i < K*loops; i++) {
- junk += s[rand.nextULessThan(K)];
- }
-}
-
// Push many times.
BENCH(ChunkAlloc_Push) {
@@ -146,11 +124,6 @@
for (int i = 0; i < K*loops; i++) s.push(i);
}
-BENCH(vector_Push) {
- std::vector<int> s;
- for (int i = 0; i < K*loops; i++) s.push_back(i);
-}
-
// Push then immediately pop many times.
BENCH(ChunkAlloc_PushPop) {
@@ -185,14 +158,6 @@
}
}
-BENCH(vector_PushPop) {
- std::vector<int> s;
- for (int i = 0; i < K*loops; i++) {
- s.push_back(i);
- s.pop_back();
- }
-}
-
// Push many items, then pop them all.
BENCH(Deque_PushAllPopAll) {
@@ -212,9 +177,3 @@
for (int i = 0; i < K*loops; i++) s.push(i);
for (int i = 0; i < K*loops; i++) s.pop();
}
-
-BENCH(vector_PushAllPopAll) {
- std::vector<int> s;
- for (int i = 0; i < K*loops; i++) s.push_back(i);
- for (int i = 0; i < K*loops; i++) s.pop_back();
-}