Stabilize benchmarking report #183
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
benchmark_min_warmup_time=0.1to warmup each benchmark.benchmark_repetitionsfrom10to30to get more test results.--benchmark_min_time=0.1sto keep the overall execution time similar with before.benchmark_enable_random_interleaving=trueto avoid transient high load.BM_SmallObjectInvocationViaProxy,BM_SmallObjectInvocationViaVirtualFunction,BM_LargeObjectInvocationViaProxyandBM_LargeObjectInvocationViaVirtualFunction, moved data preparation from global to each function body to make sure each case runs from a clean state.15 * sizeof(void*)into5 * sizeof(void*)to have less effects on heap allocation.12,000into30,000for better differentiation.workflow_dispatchfor CI pipeline to facilitate benchmarking.Here's the report generated from the CI build of this PR.
Benchmarking Report
proxyvs. virtual functionsproxyis about 233.7% fasterproxyis about 39.5% fasterproxyis about 44.7% fasterproxyis about 6.7% fasterproxyvs. virtual functionsproxyis about 173.2% fasterproxyis about 16.2% fasterproxyis about 14.8% fasterproxyis about 10.2% fasterproxyvs.std::unique_ptrproxyis about 439.1% fasterproxyis about 87.2% fasterproxyis about 378.3% fasterproxyis about 302.0% fasterproxyvs.std::shared_ptr(without memory pool)proxyis about 672.9% fasterproxyis about 115.4% fasterproxyis about 492.3% fasterproxyis about 438.8% fasterproxyvs.std::shared_ptr(with memory pool)proxyis about 187.4% fasterproxyis about 181.4% fasterproxyis about 652.7% fasterproxyis about 156.1% fasterproxyvs.std::anyproxyis about 56.2% fasterproxyis about 47.7% fasterproxyis about 323.8% fasterproxyis about 14.1% fasterproxy(without memory pool) vs.std::unique_ptrproxyis about 18.7% fasterproxyis about 8.1% fasterproxyis about 11.7% fasterproxyis about 5.6% slowerproxy(with memory pool) vs.std::unique_ptrproxyis about 265.8% fasterproxyis about 90.7% fasterproxyis about 130.8% fasterproxyis about 93.1% fasterproxyvs.std::shared_ptr(both without memory pool)proxyis about 34.1% fasterproxyis about 5.3% fasterproxyis about 7.6% fasterproxyis about 5.6% fasterproxyvs.std::shared_ptr(both with memory pool)proxyis about 8.9% fasterproxyis about 9.4% fasterproxyis about 16.7% fasterproxyis about 42.9% fasterproxy(without memory pool) vs.std::anyproxyis about 15.3% fasterproxyis about 3.1% slowerproxyis about 1.0% fasterproxyis about 5.9% fasterproxy(with memory pool) vs.std::anyproxyis about 255.5% fasterproxyis about 71.0% fasterproxyis about 108.6% fasterproxyis about 116.5% faster