Commit e7a3ca3d authored by Karl Skomski's avatar Karl Skomski Committed by Trevor Norris
Browse files

src: use subarray() in Buffer#slice() for speedup

Use the built-in Typed Array method subarray() to improve performance of
Buffer#slice().

Benchmark improvements:

    benchmark/buffer-slice: 40%
    benchmark/buffer-creation (pool): 25%

Additional tests also added.

PR-URL: https://github.com/nodejs/node/pull/2777


Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
Reviewed-By: default avatarСковорода Никита Андреевич <chalkerx@gmail.com>
parent 7d927ab5
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