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:
Trevor Norris <trev.norris@gmail.com>
Reviewed-By:
Сковорода Никита Андреевич <chalkerx@gmail.com>
parent
7d927ab5
Please register or sign in to comment