buffer: Buffer.concat upgrade in performance
Check for list length only once ant not every time the loop increments its value, this way we can have an improvement in performance.
(If this PR gets approved i would be happy to collaborated and do the same process over the /lib/buffer.js
file and others as well
Here are the benchmark i ran in my local, before:
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
buffer