summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/vector/profile
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/vector/profile')
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc b/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc
new file mode 100644
index 000000000..1e9d01afe
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc
@@ -0,0 +1,18 @@
+// Test vector: performance difference 25% (0.444s vs 0.539s)
+// Advice: set tmp as 10000
+
+#include <vector>
+
+using std::vector;
+
+int main()
+{
+ vector <int> tmp;
+
+ for (int j=0; j<2000; j++)
+ // Insert more than default item
+ for (int i=0; i<10000; i++) {
+ tmp.push_back(i);
+ }
+}
+