Skip to content

buffer: expose FastBuffer

Ref: https://github.com/nodejs/node/issues/33477

As mentioned in the linked issue, having access to the FastBuffer is really useful in userland as it provides a more performant and direct method of creating a Buffer instance. Currently this constructor has already been exposed via Buffer[Symbol.species], but since support for Symbol.species may be removed later this year (by V8) and some see this current method as an unofficial/unsupported method of obtaining a reference to the constructor, this PR adds an official, explicit method.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading