heap: make array buffer maps disjoint
authorfedor <fedor@indutny.com>
Tue, 1 Sep 2015 06:51:51 +0000 (23:51 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 1 Sep 2015 06:52:11 +0000 (06:52 +0000)
commit9e3676da9ab1aaf7de3e8582cb3fdefcc3dbaf33
tree305759af667e5e26161e153fb6cc2d435abf7566
parent1cd96c5b92895b7f263d8b42cfebfa264809b95f
heap: make array buffer maps disjoint

Remove intersection from the `std::map`s representing current live
ArrayBuffers. While being simpler to understand, it poses significant
performance issue for the active ArrayBuffer users (like node.js).

Store buffers separately, and process them together during mark-sweep phase.

The results of benchmarks are:

$ ./node-slow bench && ./node-fast bench
4997.4 ns/op
4685.7 ns/op

NOTE: `fast` - was a patched node.js, `slow` - unpatched node.js with vanilla v8.

BUG=

Review URL: https://codereview.chromium.org/1316873004

Cr-Commit-Position: refs/heads/master@{#30495}
src/heap/heap.cc
src/heap/heap.h
src/heap/mark-compact.cc