[PM] Fix O(N) erase in V8PerFrameMemoryDecorator
Use a sorted vector and lower_bound instead of flat_map to associate frame tokens with V8PerFrameMemory results, since flat_map's erase is O(N). This turns an accidental O(N^2) loop into the expected O(NlogN), without allocating any extra memory for helper structs. R=chrisha Bug: 1080672 Change-Id: I69057aa27c8e647bcc1a6967de62c81f0d9af82b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2335802 Commit-Queue: Joe Mason <joenotcharles@chromium.org> Reviewed-by:Chris Hamilton <chrisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#798689}
Showing
Please register or sign in to comment