diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-09-07 17:40:43 -0700 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-09-07 21:26:25 -0700 |
commit | 31450fce7c8fe6804c84a7875d2f85a78b309125 (patch) | |
tree | 565f9ab9ce95ae702a24830e2cf6288ef3ff821b /deps/v8/src/heap/heap.h | |
parent | c7be08cec18b0591381126e149cac96a05125966 (diff) | |
download | node-new-31450fce7c8fe6804c84a7875d2f85a78b309125.tar.gz |
deps: improve ArrayBuffer performance in v8
This a backport of the following commits from the v8's upstream:
* 1a8c38c50513f9af07ada479629a653e1cf36ff3
* 206f12abee3f1e7eda8fc6521d48f3c319460ee1
* 9e3676da9ab1aaf7de3e8582cb3fdefcc3dbaf33
Original commit message:
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.
PR-URL: https://github.com/nodejs/node/pull/2732
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'deps/v8/src/heap/heap.h')
-rw-r--r-- | deps/v8/src/heap/heap.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/deps/v8/src/heap/heap.h b/deps/v8/src/heap/heap.h index 4c9e3ad144..0f0cfc15fc 100644 --- a/deps/v8/src/heap/heap.h +++ b/deps/v8/src/heap/heap.h @@ -2147,21 +2147,6 @@ class Heap { // Called on heap tear-down. Frees all remaining ArrayBuffer backing stores. void TearDownArrayBuffers(); - // These correspond to the non-Helper versions. - void RegisterNewArrayBufferHelper(std::map<void*, size_t>& live_buffers, - void* data, size_t length); - void UnregisterArrayBufferHelper( - std::map<void*, size_t>& live_buffers, - std::map<void*, size_t>& not_yet_discovered_buffers, void* data); - void RegisterLiveArrayBufferHelper( - std::map<void*, size_t>& not_yet_discovered_buffers, void* data); - size_t FreeDeadArrayBuffersHelper( - Isolate* isolate, std::map<void*, size_t>& live_buffers, - std::map<void*, size_t>& not_yet_discovered_buffers); - void TearDownArrayBuffersHelper( - Isolate* isolate, std::map<void*, size_t>& live_buffers, - std::map<void*, size_t>& not_yet_discovered_buffers); - // Record statistics before and after garbage collection. void ReportStatisticsBeforeGC(); void ReportStatisticsAfterGC(); |