[PATCH] Optimize pool resource allocation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[PATCH] Optimize pool resource allocation

Jonathan Wakely-3
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.

Tested x86_64-linux, committed to trunk.

patch.txt (10K) Download Attachment