Skip to content

Commit

Permalink
refactor(ext/node): Use an internal DataView in Buffer
Browse files Browse the repository at this point in the history
This way Buffer polyfill doesn't need to reimplement the
methods for reading data from an ArrayBuffer
backing store. Instead the DataView APIs are used that then
internally call V8 implementations of these algorithms.

This reduces the amount of code needed for the Buffer polyfill
significantly. It also provides performance benefits especially
for reading floating point numbers.
  • Loading branch information
aapoalas committed Oct 28, 2023
1 parent 5b2d9fb commit 030fe87
Show file tree
Hide file tree
Showing 2 changed files with 518 additions and 663 deletions.
Loading

0 comments on commit 030fe87

Please sign in to comment.