Commit 1fdec652 authored by Fedor Indutny's avatar Fedor Indutny Committed by Ali Ijaz Sheikh
Browse files

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.

Ref: https://github.com/nodejs/node/pull/2732
PR-URL: https://github.com/nodejs/node/pull/3351


Reviewed-By: default avatarindutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: default avatarbnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
parent 5cd1fd83
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment