Optimize pool resource allocation
commitc991672af0ef1a1edecb4b2a0602befe181af4bb
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Nov 2018 00:04:19 +0000 (15 00:04 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Nov 2018 00:04:19 +0000 (15 00:04 +0000)
treeb0952465e1c2f6afda1f2146fb03002de2d0b1d4
parentc1638e07cadfc49f344fff5f8550ad956abb2345
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266164 138bc75d-0d04-0410-961f-82ee72b054a4
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