Files
Gürgün Dayıoğlu 41918c1d44 buffer: use typed arrays for 64-bit BigInt accessors
readBig(U)Int64{LE,BE}() and writeBig(U)Int64{LE,BE}() assembled and
split values with BigInt arithmetic, allocating intermediate BigInts on
every call. Copy the bytes through BigInt64Array and BigUint64Array
views over the existing 8-byte scratch buffer instead, as the double
accessors already do.

Range and bounds checks are unchanged, and the value is masked with
`& -1n` before the store so non-BigInt values still throw the same
TypeError instead of being coerced by the typed array.

benchmark/buffers/buffer-read.js now uses the value it reads. The
loop discarded it, which let V8 remove side-effect-free reads
altogether.

Assisted-by: claude:opus-5.5
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: https://github.com/nodejs/node/pull/67549
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 17:13:01 +00:00
..
2026-09-28 04:22:37 +00:00
2025-05-09 19:41:31 +00:00