Optimize pool resource allocation
authorJonathan Wakely <jwakely@redhat.com>
Thu, 15 Nov 2018 00:04:19 +0000 (00:04 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 15 Nov 2018 00:04:19 +0000 (00:04 +0000)
commita15032ee7bce189634618226975ebf33a4e8e7aa
treeb0952465e1c2f6afda1f2146fb03002de2d0b1d4
parentaeb2b1f7fbe1907f6ff6feaac4f042decd895765
Optimize pool resource allocation

A recent change caused a performance regression. This restores the
previous performance and adds a performance test.

* scripts/check_performance: Allow tests to choose a -std flag.
* src/c++17/memory_resource.cc (bitset::get_first_unset()): Use local
variables of the right types. Call update_next_word() unconditionally.
* testsuite/20_util/unsynchronized_pool_resource/cons.cc: New test.
* testsuite/performance/20_util/memory_resource/pools.cc: New test.
* testsuite/util/testsuite_performance.h (time_counter): Allow
timer to be restarted.

From-SVN: r266164
libstdc++-v3/ChangeLog
libstdc++-v3/scripts/check_performance
libstdc++-v3/src/c++17/memory_resource.cc
libstdc++-v3/testsuite/20_util/unsynchronized_pool_resource/cons.cc [new file with mode: 0644]
libstdc++-v3/testsuite/performance/20_util/memory_resource/pools.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/testsuite_performance.h