7e0279fae7
When compiling modules with many functions, the list of regions in the {DisjointAllocationPool} can become quite large if the functions die in a random order (which they typically do, since the order of Liftoff compilation is different than the order to TurboFan compilation; which work stealing, both are nondeterministic). Iterating the list of regions in the {DisjointAllocationPool} was thus linear in the number of regions, which is linear in the number of functions of the module. Since we insert new regions one by one, overall runtime was quadratic. This CL fixes this by switching from a linked list to a std::set. Merging a new region is thus logarithmic instead of linear, and overall we are {n*log(n)} instead of {n^2}. Note: For {AllocateInRegion} we still need to linearly iterate all regions that overlap the requested region, but this has not shown to be a problem so far. R=ahaas@chromium.org Bug: v8:10432 Change-Id: I193e56c2abab782e386194fbe64dadfa250916f7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154797 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#67303} |
||
---|---|---|
.. | ||
benchmarks | ||
cctest | ||
common | ||
debugger | ||
debugging | ||
fuzzer | ||
inspector | ||
intl | ||
js-perf-test | ||
memory | ||
message | ||
mjsunit | ||
mkgrokdump | ||
mozilla | ||
test262 | ||
torque | ||
unittests | ||
wasm-api-tests | ||
wasm-js | ||
wasm-spec-tests | ||
webkit | ||
BUILD.gn | ||
OWNERS |