Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buffer: faster case for create Buffer from new Buffer(0)
When create Buffer from a Buffer will copy data from old to new even though length is zero. This patch can improve edge case 4x faster. following is benchmark results. new: buffers/buffer_zero.js n=1024: 2463.53891 old: buffers/buffer_zero.js n=1024: 618.70801 PR-URL: #4326 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information