Improve InterningIndex performance by switching to std::array.
Instead of MRUCache which uses a sorted map under the hood. Use two std:arrays, one to store all the keys (very cache friendly when scanning them). And then immediately jump to the value in the other array. This leads to a ~9% speed up (5 to 13% at the 95% confidence). See the "two_arrays tracing/tipOfTreeTracing" sheet in https://docs.google.com/spreadsheets/d/1HIiyUQa7d8eLfMBBBm_7V60kqNABYoFbHpKdpwnYu78/ Total tracing overhead is ~59.8% (52% to 67% at the 95% confidence). See the "two_arrays tracing/tipOfTreeNotTracing" sheet in the doc above. Bug: 1007611 Change-Id: Ie2584e0e3a13e34097021fd128387cfa4fabaeed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1844822 Commit-Queue: Stephen Nusko <nuskos@chromium.org> Reviewed-by:Stephen Nusko <nuskos@chromium.org> Reviewed-by:
Eric Seckler <eseckler@chromium.org> Auto-Submit: Stephen Nusko <nuskos@chromium.org> Cr-Commit-Position: refs/heads/master@{#703377}
Showing
Please register or sign in to comment