Skip to content

buffer: port `byteLengthUtf8` to JavaScript

Please don't land this PR yet. There is a missing V8 optimization, that is going to be available soon in V8 6.6.


Prior to this change the majority of the time spent when calling Buffer.byteLength was spent on crossing JS->C++ boundary. This change move the function to JavaScript, making it much faster.

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
Affected core subsystem(s)

buffer

Merge request reports

Loading