Commit 7b1d1edf by Felix Yen Committed by Benjamin Kosnik

allocator_thread.cc (do_loop): Don't use clear, but instead assign.


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.

From-SVN: r76979
parent c9732ce7
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.
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment