]> zoso.dev Git - buffer.git/commit
Add fast path for Buffer.concat with Uint8Array.
authorKoushik Dutta <koushd@gmail.com>
Wed, 8 Jan 2020 21:27:39 +0000 (13:27 -0800)
committerKoushik Dutta <koushd@gmail.com>
Wed, 8 Jan 2020 21:27:39 +0000 (13:27 -0800)
commit1c4e236b3892ede9977f552dd8d76ddd9798f314
tree914f70bb15669fc4b0131bf6834a7a80175bea6c
parent1df9870ea0f1fb89d2a84940464f4c4cfef053c1
Add fast path for Buffer.concat with Uint8Array.

Previous implementation would copy the Uint8Array into a new Buffer object,
and then concatenate it. It is faster to use the Uint8Array.set (which Buffer.copy
uses internally) anyways.
index.js