Skip to content

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: image

After: image

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

buffer

Merge request reports

Loading