aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/performance/20_util/allocator_thread.cc7
2 files changed, 9 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a83d268..10068e9 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-30 Felix Yen <fwy@alumni.brown.edu>
+
+ * testsuite/performance/20_util/allocator_thread.cc (do_loop):
+ Don't use clear, but instead assign. Use insert.
+
2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
* src/demangle.cc: Add instantiations.
diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator_thread.cc b/libstdc++-v3/testsuite/performance/20_util/allocator_thread.cc
index b313a1f..e9e8428 100644
--- a/libstdc++-v3/testsuite/performance/20_util/allocator_thread.cc
+++ b/libstdc++-v3/testsuite/performance/20_util/allocator_thread.cc
@@ -73,15 +73,16 @@ template<typename Container>
while (test_iterations < iterations)
{
for (int j = 0; j < insert_values; ++j)
- obj.push_back(test_iterations);
+ obj.insert(obj.begin(), test_iterations);
++test_iterations;
}
- obj.clear();
+ // NB: Don't use clear() here, instead force deallocation.
+ obj = Container();
test_iterations = 0;
while (test_iterations < iterations)
{
for (int j = 0; j < insert_values; ++j)
- obj.push_back(test_iterations);
+ obj.insert(obj.begin(), test_iterations);
++test_iterations;
}
}