Skip to content

buffer: improve performance of multiple Buffer operations#61871

Open
thisalihassan wants to merge 7 commits intonodejs:mainfrom
thisalihassan:buffer-perf-improvements
Open

buffer: improve performance of multiple Buffer operations#61871
thisalihassan wants to merge 7 commits intonodejs:mainfrom
thisalihassan:buffer-perf-improvements

Conversation

@thisalihassan
Copy link
Contributor

@thisalihassan thisalihassan commented Feb 17, 2026

Multiple performance improvements to Buffer operations, verified with benchmarks (15-30 runs, comparing old vs new binaries built from same tree).

Buffer.copyBytesFrom() (+100-210%)
Avoid intermediate TypedArrayPrototypeSlice allocation by calculating byte offsets directly into the source TypedArray's underlying ArrayBuffer.

Buffer.prototype.fill("t", "ascii") (+26-37%)

ASCII indexOf (+14-46%)
Call indexOfString directly for ASCII encoding instead of first converting the search value to a Buffer via fromStringFast and then calling indexOfBuffer. ASCII and Latin-1 share the same byte values for characters 0-127.

swap16/32/64 (+3-38%)
Add V8 Fast API C++ functions (FastSwap16/32/64) alongside the existing slow path. Largest gains at len=256 (+35%).

Benchmark results

Key results (15-30 runs, *** = p < 0.001):

Benchmark Improvement
copyBytesFrom (offset, Uint8Array, len=256) +210% ***
copyBytesFrom (offset+length, Uint8Array, len=256) +206% ***
swap16 len=256 +38% ***
fill("t", "ascii") size=8192 +37% ***
indexOf ASCII 'Alice' +46% ***
indexOf ASCII '@' +31% ***
fill("t", "ascii") size=65536 +26% ***
swap64 len=768 aligned +12% ***

Attaching Details below:
detail.pdf -- visual breakdown
buffer-benchmark-all-rebased.csv -- raw benchmark CSV
compare-R-output.txt-- full output

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 17, 2026
@thisalihassan thisalihassan force-pushed the buffer-perf-improvements branch from d2ba38f to 495feb5 Compare February 17, 2026 21:41
Comment on lines +1210 to +1217
void FastSwap16(Local<Value> receiver,
Local<Value> buffer_obj,
// NOLINTNEXTLINE(runtime/references)
FastApiCallbackOptions& options) {
HandleScope scope(options.isolate);
ArrayBufferViewContents<char> buffer(buffer_obj);
CHECK(nbytes::SwapBytes16(const_cast<char*>(buffer.data()), buffer.length()));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fast callbacks are non-identical to the conventional callbacks they shadow.

  • The existing callbacks validate their argument and throws to JS if invalid, whereas your fast callbacks hard-crash the process. It might be better to validate in the JS layer, then use the same unwrapping logic on both sides.
  • Your fast callback cannot have a different return convention to the conventional callback. You will need to remove the return value from the conventional callback.

Copy link
Member

@ChALkeR ChALkeR Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was removing the validation instead of moving it to js intentional?

Also fast paths can keep the validation and fall back to slow i think, so we can still validate on the src side?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fast paths can keep the validation and fall back to slow i think, so we can still validate on the src side?

This is outdated, the fast API doesn't use fallback any more (since Node.js v23.x).

However, any validation in a JS wrapper should be shadowed by a CHECK or DCHECK in the C++ binding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPREAD_BUFFER_ARG already contains CHECK((val)->IsArrayBufferView()) on all Slow & Fast swap methods

lib/buffer.js Outdated
byteOffset,
encodingsMap.ascii,
dir),
indexOfString(buf, val, byteOffset, encodingsMap.latin1, dir),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same behaviour AFAICT, but encodingsMap.ascii seems more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes same behaviour IndexOfString only has branches for UCS2, UTF8, and Latin1, Adding an ASCII branch to IndexOfString would just be a duplicate of the Latin1 branch since ASCII is a subset of Latin1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my point, these are still discrete encodings even though the behaviour here is the same, so this should pass encodingsMap.ascii to the binding and IndexOfString should add a condition to send this down the same path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +1210 to +1217
void FastSwap16(Local<Value> receiver,
Local<Value> buffer_obj,
// NOLINTNEXTLINE(runtime/references)
FastApiCallbackOptions& options) {
HandleScope scope(options.isolate);
ArrayBufferViewContents<char> buffer(buffer_obj);
CHECK(nbytes::SwapBytes16(const_cast<char*>(buffer.data()), buffer.length()));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fast callbacks should include debug tracking and call tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing these I will update the code

@Renegade334 Renegade334 added performance Issues and PRs related to the performance of Node.js. needs-benchmark-ci PR that need a benchmark CI run. labels Feb 17, 2026
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 91.13924% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.65%. Comparing base (35d3bc8) to head (a049a90).
⚠️ Report is 90 commits behind head on main.

Files with missing lines Patch % Lines
src/node_buffer.cc 70.83% 0 Missing and 7 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #61871    +/-   ##
========================================
  Coverage   89.65%   89.65%            
========================================
  Files         676      676            
  Lines      206231   206365   +134     
  Branches    39505    39534    +29     
========================================
+ Hits       184898   185019   +121     
- Misses      13463    13475    +12     
- Partials     7870     7871     +1     
Files with missing lines Coverage Δ
lib/buffer.js 99.17% <100.00%> (+0.01%) ⬆️
src/node_buffer.cc 68.09% <70.83%> (+0.11%) ⬆️

... and 40 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thisalihassan thisalihassan force-pushed the buffer-perf-improvements branch 4 times, most recently from 1395d2f to 01ba74f Compare February 17, 2026 23:42
FastApiCallbackOptions& options) {
TRACK_V8_FAST_API_CALL("buffer.swap16");
HandleScope scope(options.isolate);
ArrayBufferViewContents<char> buffer(buffer_obj);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArrayBufferViewContents is wrong here, as buffer.data() may be a stack-allocated copy of the byte data rather than the data itself. SPREAD_BUFFER_ARG is the correct macro to use here, as per the conventional callback.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Renegade334 replaced ArrayBufferViewContents with SPREAD_BUFFER_ARG in all three fast swap callbacks

Copy link
Member

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For toHex, wait until #61609, which improves native perf significantly (more than Uint8Array.prototype.toHex)

See also #60249 (comment)

} else if (value.length === 1) {
// Fast path: If `value` fits into a single byte, use that numeric value.
if (normalizedEncoding === 'utf8') {
if (normalizedEncoding === 'utf8' || normalizedEncoding === 'ascii') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, ascii behaves exactly like latin1
Unsure if by design or accidentally

Copy link
Contributor Author

@thisalihassan thisalihassan Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is safe by design I am just extending the existing single byte numeric optimization to cover ASCII, since the guard already constrains it to the valid ASCII range.

@thisalihassan
Copy link
Contributor Author

Note on toBase64 / toBase64url:

I also tried replacing the C++ base64Slice/base64urlSlice bindings with V8's Uint8Array.prototype.toBase64() (similar to the toHex change) but it caused a 35-54% regression across all buffer sizes so I reverted base64/base64url and kept only the toHex optimization which showed a clear +26-37% win.

@ChALkeR
Copy link
Member

ChALkeR commented Feb 18, 2026

@thisalihassan toHex doesn't show a win anymore with nbytes update which should soon land (as it landed in nbytes)

Instead, it's ~3x slower.

See nodejs/nbytes#12

@thisalihassan
Copy link
Contributor Author

thisalihassan commented Feb 18, 2026

Hi @ChALkeR thanks for flagging I was not aware. I benchmarked the nibble approach locally and it's indeed a much bigger win (~3x vs my ~30% with toHex). Reverted the toHex path entirely the other changes in this PR are unaffected.

Should I include the nbytes nibble HexEncode optimization in this PR or keep them as separate PRs?

PS: One test is failing /test/parallel/test-debugger-restart-message.js I believe it's known mac issue and unrelated to my changes

@thisalihassan
Copy link
Contributor Author

For toHex, wait until #61609, which improves native perf significantly (more than Uint8Array.prototype.toHex)

See also #60249 (comment)

Hi @ChALkeR I see that your changes landed, congratualtions on that huge win. Is there benchmark-ci that we can run on this PR? I can rebase it

@thisalihassan
Copy link
Contributor Author

thisalihassan commented Feb 24, 2026

I re-ran the benchmark against the latest main (which contains the nibble improvement) and found out there are few regressions caused by my code:

buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='aaaaaaaaaaaaaaaaa' *** -9.41 %
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='aaaaaaaaaaaaaaaaa' *** -10.93
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='aaaaaaaaaaaaaaaaa' *** -9.44 %
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='aaaaaaaaaaaaaaaaa' *** -9.18 %

I tried fixing this regression but unavoidable

Attaching Details below:
detail.pdf -- visual breakdown

buffer-benchmark-all-rebased.csv -- raw benchmark CSV

@thisalihassan
Copy link
Contributor Author

thisalihassan commented Feb 24, 2026

compare-R-output.txt-- full output from Rscript benchmark/compare.R (shared as a file to avoid cluttering the PR comment).

- copyBytesFrom: calculate byte offsets directly instead of
  slicing into an intermediate typed array
- toString('hex'): use V8 Uint8Array.prototype.toHex() builtin
- fill: add single-char ASCII fast path
- indexOf: use indexOfString directly for ASCII encoding
- swap16/32/64: add V8 Fast API functions
- Guard ensureUint8ArrayToHex against --no-js-base-64 flag by
  falling back to C++ hexSlice when toHex is unavailable
- Remove THROW_AND_RETURN_UNLESS_BUFFER and return value from
  slow Swap16/32/64 to match fast path conventions (JS validates)
- Add TRACK_V8_FAST_API_CALL to FastSwap16/32/64
- Add test/parallel/test-buffer-swap-fast.js for fast API verification
Remove V8 Uint8Array.prototype.toHex() path for Buffer.toString('hex')
in favour of the upcoming nbytes HexEncode improvement (nodejs/nbytes#12)
which is ~3x faster through the existing C++ hexSlice path.

Refs: nodejs/nbytes#12
@thisalihassan thisalihassan force-pushed the buffer-perf-improvements branch from 59f5d09 to 48abfc5 Compare February 27, 2026 23:09
@thisalihassan
Copy link
Contributor Author

PS: I resolved some conflicts

@thisalihassan
Copy link
Contributor Author

Hi @ChALkeR @anonrig @Renegade334 is this PR ready to land? can you also please check the latest benchmarks i have posted, I have compiled PDF for this benchmark in one my comments above for more detail

Screenshot 2026-03-01 at 2 29 23 AM Screenshot 2026-03-01 at 2 29 40 AM Screenshot 2026-03-01 at 2 29 54 AM Screenshot 2026-03-01 at 2 28 57 AM

Copy link
Member

@Qard Qard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, but one small nit.

@aduh95
Copy link
Contributor

aduh95 commented Mar 4, 2026

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1807/

@thisalihassan
Copy link
Contributor Author

thisalihassan commented Mar 4, 2026

Results from the CI, however it tells a slightly different story than my local benchmark at n=30

buffers/buffer-atob.js n=1000000 size=128                                                                                                                      -1.51 %       ±1.64%  ±2.19%  ±2.85%
buffers/buffer-atob.js n=1000000 size=16                                                                                                                 *     -1.98 %       ±1.49%  ±1.99%  ±2.59%
buffers/buffer-atob.js n=1000000 size=32                                                                                                               ***     -2.89 %       ±1.32%  ±1.77%  ±2.31%
buffers/buffer-atob.js n=1000000 size=64                                                                                                               ***     -3.17 %       ±1.34%  ±1.79%  ±2.34%
buffers/buffer-base64-decode-wrapped.js n=32 linesCount=524288 charsPerLine=76                                                                                  0.61 %       ±0.83%  ±1.11%  ±1.47%
buffers/buffer-base64-decode.js size=8388608 n=32                                                                                                              -0.10 %       ±0.18%  ±0.24%  ±0.31%
buffers/buffer-base64-encode.js n=32 len=67108864                                                                                                              -0.02 %       ±0.10%  ±0.14%  ±0.18%
buffers/buffer-base64url-decode.js size=8388608 n=32                                                                                                            0.14 %       ±0.16%  ±0.21%  ±0.28%
buffers/buffer-base64url-encode.js n=32 len=67108864                                                                                                           -0.04 %       ±0.09%  ±0.12%  ±0.15%
buffers/buffer-btoa.js n=1000000 size=1024                                                                                                               *     -0.67 %       ±0.64%  ±0.86%  ±1.12%
buffers/buffer-btoa.js n=1000000 size=128                                                                                                                *      2.01 %       ±1.88%  ±2.50%  ±3.25%
buffers/buffer-btoa.js n=1000000 size=16                                                                                                                       -2.11 %       ±2.22%  ±2.95%  ±3.84%
buffers/buffer-btoa.js n=1000000 size=256                                                                                                                      -0.93 %       ±1.63%  ±2.17%  ±2.82%
buffers/buffer-btoa.js n=1000000 size=32                                                                                                                **     -2.37 %       ±1.58%  ±2.10%  ±2.74%
buffers/buffer-btoa.js n=1000000 size=64                                                                                                                       -1.72 %       ±1.82%  ±2.42%  ±3.16%
buffers/buffer-bytelength-buffer.js n=4000000 len=16                                                                                                           -1.09 %       ±2.86%  ±3.81%  ±4.97%
buffers/buffer-bytelength-buffer.js n=4000000 len=2                                                                                                             0.76 %       ±2.79%  ±3.71%  ±4.83%
buffers/buffer-bytelength-buffer.js n=4000000 len=256                                                                                                          -0.61 %       ±2.83%  ±3.77%  ±4.90%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='four_bytes'                                                                     -0.63 %       ±2.81%  ±3.74%  ±4.86%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='latin1'                                                                         -0.01 %       ±2.78%  ±3.70%  ±4.81%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='one_byte'                                                                        1.01 %       ±2.85%  ±3.79%  ±4.93%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='three_bytes'                                                                    -0.80 %       ±2.40%  ±3.19%  ±4.15%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='two_bytes'                                                                       1.99 %       ±2.65%  ±3.53%  ±4.59%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='hex' type='four_bytes'                                                                        -0.79 %       ±4.23%  ±5.63%  ±7.33%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='hex' type='latin1'                                                                            -1.42 %       ±3.77%  ±5.02%  ±6.53%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='hex' type='one_byte'                                                                           0.05 %       ±3.96%  ±5.27%  ±6.86%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='hex' type='three_bytes'                                                                        3.11 %       ±3.45%  ±4.59%  ±5.98%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='hex' type='two_bytes'                                                                         -1.76 %       ±4.20%  ±5.60%  ±7.30%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='latin1' type='four_bytes'                                                                      0.74 %       ±3.87%  ±5.16%  ±6.72%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='latin1' type='latin1'                                                                         -2.12 %       ±3.75%  ±4.99%  ±6.50%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='latin1' type='one_byte'                                                                       -0.47 %       ±3.77%  ±5.01%  ±6.52%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='latin1' type='three_bytes'                                                                     2.02 %       ±3.80%  ±5.07%  ±6.62%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='latin1' type='two_bytes'                                                                      -0.10 %       ±3.43%  ±4.57%  ±5.95%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='four_bytes'                                                               ***     -3.85 %       ±1.09%  ±1.45%  ±1.89%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='latin1'                                                                           -1.86 %       ±2.45%  ±3.26%  ±4.25%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='one_byte'                                                                 ***     -4.20 %       ±2.05%  ±2.73%  ±3.55%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='three_bytes'                                                                       0.16 %       ±1.30%  ±1.73%  ±2.25%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='two_bytes'                                                                        -1.56 %       ±2.29%  ±3.04%  ±3.96%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='four_bytes'                                                                    -0.40 %       ±2.97%  ±3.96%  ±5.15%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='latin1'                                                                         0.50 %       ±2.55%  ±3.39%  ±4.41%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='one_byte'                                                                      -1.03 %       ±2.78%  ±3.70%  ±4.82%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='three_bytes'                                                                   -1.02 %       ±2.81%  ±3.74%  ±4.88%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='two_bytes'                                                                     -0.39 %       ±2.77%  ±3.69%  ±4.80%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='hex' type='four_bytes'                                                                        2.31 %       ±3.63%  ±4.83%  ±6.29%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='hex' type='latin1'                                                                           -1.52 %       ±4.06%  ±5.40%  ±7.03%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='hex' type='one_byte'                                                                         -1.16 %       ±4.17%  ±5.55%  ±7.23%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='hex' type='three_bytes'                                                                       3.03 %       ±3.70%  ±4.93%  ±6.42%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='hex' type='two_bytes'                                                                         0.53 %       ±4.02%  ±5.34%  ±6.95%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='latin1' type='four_bytes'                                                                     1.16 %       ±3.84%  ±5.11%  ±6.66%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='latin1' type='latin1'                                                                        -1.88 %       ±3.60%  ±4.79%  ±6.23%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='latin1' type='one_byte'                                                                       1.57 %       ±3.91%  ±5.20%  ±6.77%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='latin1' type='three_bytes'                                                                   -2.19 %       ±3.79%  ±5.04%  ±6.56%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='latin1' type='two_bytes'                                                                      0.42 %       ±3.78%  ±5.04%  ±6.55%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='four_bytes'                                                                       0.04 %       ±0.09%  ±0.12%  ±0.16%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='latin1'                                                                          -0.23 %       ±0.73%  ±0.97%  ±1.26%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='one_byte'                                                                ***     -5.34 %       ±2.78%  ±3.70%  ±4.81%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='three_bytes'                                                             ***     -0.70 %       ±0.20%  ±0.27%  ±0.35%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='two_bytes'                                                               ***     -1.12 %       ±0.23%  ±0.31%  ±0.41%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='four_bytes'                                                                      1.38 %       ±2.35%  ±3.13%  ±4.08%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='latin1'                                                                         -0.19 %       ±2.84%  ±3.77%  ±4.91%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='one_byte'                                                                       -2.33 %       ±2.85%  ±3.80%  ±4.95%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='three_bytes'                                                                    -0.53 %       ±3.12%  ±4.14%  ±5.39%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='two_bytes'                                                                      -0.02 %       ±2.79%  ±3.71%  ±4.83%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='hex' type='four_bytes'                                                                        -2.24 %       ±4.05%  ±5.39%  ±7.02%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='hex' type='latin1'                                                                             1.14 %       ±4.02%  ±5.35%  ±6.97%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='hex' type='one_byte'                                                                           0.81 %       ±4.30%  ±5.72%  ±7.45%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='hex' type='three_bytes'                                                                       -0.60 %       ±4.00%  ±5.33%  ±6.93%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='hex' type='two_bytes'                                                                         -0.48 %       ±3.84%  ±5.11%  ±6.65%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='latin1' type='four_bytes'                                                                     -3.35 %       ±3.56%  ±4.73%  ±6.16%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='latin1' type='latin1'                                                                         -0.96 %       ±4.04%  ±5.38%  ±7.00%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='latin1' type='one_byte'                                                                       -2.28 %       ±3.91%  ±5.20%  ±6.78%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='latin1' type='three_bytes'                                                                     0.86 %       ±3.99%  ±5.31%  ±6.91%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='latin1' type='two_bytes'                                                                      -1.57 %       ±4.06%  ±5.41%  ±7.04%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='four_bytes'                                                                **     -0.73 %       ±0.49%  ±0.65%  ±0.84%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='latin1'                                                                    **     -3.65 %       ±2.62%  ±3.48%  ±4.53%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='one_byte'                                                                  **     -5.28 %       ±3.80%  ±5.06%  ±6.59%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='three_bytes'                                                              ***      6.20 %       ±2.58%  ±3.43%  ±4.47%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='two_bytes'                                                                 **      2.81 %       ±1.94%  ±2.58%  ±3.36%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='four_bytes'                                                                    1.69 %       ±2.46%  ±3.27%  ±4.26%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='latin1'                                                                       -1.22 %       ±2.43%  ±3.23%  ±4.21%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='one_byte'                                                                     -0.65 %       ±2.62%  ±3.49%  ±4.54%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='three_bytes'                                                                  -1.68 %       ±2.21%  ±2.94%  ±3.82%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='two_bytes'                                                                    -2.18 %       ±3.04%  ±4.04%  ±5.26%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='hex' type='four_bytes'                                                                       0.85 %       ±3.51%  ±4.67%  ±6.08%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='hex' type='latin1'                                                                           2.09 %       ±3.95%  ±5.26%  ±6.85%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='hex' type='one_byte'                                                                         2.72 %       ±4.06%  ±5.40%  ±7.03%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='hex' type='three_bytes'                                                                     -2.60 %       ±3.74%  ±4.97%  ±6.48%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='hex' type='two_bytes'                                                                        0.91 %       ±3.71%  ±4.93%  ±6.42%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='latin1' type='four_bytes'                                                                   -1.38 %       ±3.23%  ±4.31%  ±5.63%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='latin1' type='latin1'                                                                        1.85 %       ±4.12%  ±5.48%  ±7.13%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='latin1' type='one_byte'                                                                      1.53 %       ±4.01%  ±5.34%  ±6.95%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='latin1' type='three_bytes'                                                                   3.44 %       ±3.45%  ±4.59%  ±5.97%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='latin1' type='two_bytes'                                                                    -2.08 %       ±3.72%  ±4.95%  ±6.44%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='four_bytes'                                                                     -0.00 %       ±0.01%  ±0.01%  ±0.01%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='latin1'                                                                   *     -0.21 %       ±0.16%  ±0.22%  ±0.29%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='one_byte'                                                                 *      1.81 %       ±1.76%  ±2.36%  ±3.09%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='three_bytes'                                                              *      0.16 %       ±0.13%  ±0.17%  ±0.22%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='two_bytes'                                                              ***     -1.34 %       ±0.06%  ±0.08%  ±0.11%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=16                                                                                              1.37 %       ±2.48%  ±3.30%  ±4.30%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=16386                                                                                  ***     17.27 %       ±3.25%  ±4.33%  ±5.63%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=4096                                                                                            0.42 %       ±3.61%  ±4.80%  ±6.25%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=512                                                                                             0.71 %       ±3.72%  ±4.95%  ±6.45%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=16                                                                                             -0.78 %       ±2.77%  ±3.69%  ±4.80%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=16386                                                                                  ***     13.76 %       ±5.39%  ±7.19%  ±9.39%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=4096                                                                                            1.23 %       ±2.59%  ±3.44%  ±4.48%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=512                                                                                      *     -3.06 %       ±2.64%  ±3.52%  ±4.58%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=16                                                                                             -1.31 %       ±3.13%  ±4.17%  ±5.43%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=16386                                                                                  ***     17.02 %       ±4.20%  ±5.59%  ±7.29%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=4096                                                                                     *      2.32 %       ±2.08%  ±2.77%  ±3.61%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=512                                                                                             0.52 %       ±4.48%  ±5.99%  ±7.83%
buffers/buffer-compare-offset.js n=1000000 size=16 method='offset'                                                                                             -1.60 %       ±1.91%  ±2.54%  ±3.31%
buffers/buffer-compare-offset.js n=1000000 size=16 method='slice'                                                                                      ***      4.25 %       ±1.43%  ±1.91%  ±2.50%
buffers/buffer-compare-offset.js n=1000000 size=16386 method='offset'                                                                                   **     -3.44 %       ±2.01%  ±2.67%  ±3.48%
buffers/buffer-compare-offset.js n=1000000 size=16386 method='slice'                                                                                    **      2.22 %       ±1.53%  ±2.04%  ±2.66%
buffers/buffer-compare-offset.js n=1000000 size=4096 method='offset'                                                                                           -0.68 %       ±2.35%  ±3.14%  ±4.09%
buffers/buffer-compare-offset.js n=1000000 size=4096 method='slice'                                                                                      *      2.15 %       ±1.63%  ±2.17%  ±2.83%
buffers/buffer-compare-offset.js n=1000000 size=512 method='offset'                                                                                             0.78 %       ±1.99%  ±2.64%  ±3.44%
buffers/buffer-compare-offset.js n=1000000 size=512 method='slice'                                                                                      **      2.25 %       ±1.39%  ±1.86%  ±2.43%
buffers/buffer-compare.js n=1000000 size=16                                                                                                                    -0.40 %       ±2.06%  ±2.75%  ±3.59%
buffers/buffer-compare.js n=1000000 size=16386                                                                                                         ***    -16.20 %       ±1.68%  ±2.26%  ±3.00%
buffers/buffer-compare.js n=1000000 size=4096                                                                                                            *     -2.57 %       ±2.38%  ±3.18%  ±4.16%
buffers/buffer-compare.js n=1000000 size=512                                                                                                            **      2.87 %       ±1.72%  ±2.29%  ±2.98%
buffers/buffer-concat-fill.js n=800000 extraSize=1                                                                                                             -1.04 %       ±1.06%  ±1.42%  ±1.85%
buffers/buffer-concat-fill.js n=800000 extraSize=1024                                                                                                          -0.37 %       ±0.83%  ±1.10%  ±1.44%
buffers/buffer-concat-fill.js n=800000 extraSize=256                                                                                                            0.18 %       ±0.86%  ±1.15%  ±1.50%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=1 pieces=16                                                                                       0.56 %       ±1.17%  ±1.56%  ±2.04%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=1 pieces=4                                                                                 *     -1.51 %       ±1.24%  ±1.65%  ±2.15%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=16 pieces=16                                                                                      0.58 %       ±2.25%  ±3.02%  ±3.96%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=16 pieces=4                                                                                      -0.73 %       ±1.50%  ±1.99%  ±2.59%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=256 pieces=16                                                                                    -0.05 %       ±0.65%  ±0.87%  ±1.13%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=256 pieces=4                                                                                     -0.47 %       ±0.94%  ±1.25%  ±1.63%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=1 pieces=16                                                                                      -0.95 %       ±1.52%  ±2.02%  ±2.63%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=1 pieces=4                                                                                       -0.57 %       ±1.65%  ±2.19%  ±2.85%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=16 pieces=16                                                                                      0.44 %       ±1.34%  ±1.79%  ±2.34%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=16 pieces=4                                                                                      -1.24 %       ±1.95%  ±2.59%  ±3.38%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=256 pieces=16                                                                                     0.40 %       ±0.80%  ±1.06%  ±1.38%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=256 pieces=4                                                                                     -0.36 %       ±0.83%  ±1.11%  ±1.44%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=2048 type='Float64Array'                                                                         -0.09 %       ±0.43%  ±0.57%  ±0.74%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=2048 type='Uint16Array'                                                                           0.04 %       ±0.80%  ±1.06%  ±1.38%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=2048 type='Uint32Array'                                                                          -0.13 %       ±0.57%  ±0.75%  ±0.98%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=2048 type='Uint8Array'                                                                            0.19 %       ±1.03%  ±1.36%  ±1.78%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=256 type='Float64Array'                                                                          -0.92 %       ±0.99%  ±1.31%  ±1.71%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=256 type='Uint16Array'                                                                           -0.11 %       ±1.61%  ±2.15%  ±2.80%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=256 type='Uint32Array'                                                                            0.04 %       ±0.99%  ±1.31%  ±1.71%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=256 type='Uint8Array'                                                                            -0.77 %       ±1.58%  ±2.11%  ±2.74%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=64 type='Float64Array'                                                                           -0.84 %       ±1.45%  ±1.92%  ±2.50%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=64 type='Uint16Array'                                                                            -1.39 %       ±2.16%  ±2.88%  ±3.75%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=64 type='Uint32Array'                                                                             1.38 %       ±1.64%  ±2.18%  ±2.84%
buffers/buffer-copy-bytes-from.js n=600000 partial='none' len=64 type='Uint8Array'                                                                              1.11 %       ±1.93%  ±2.57%  ±3.35%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=2048 type='Float64Array'                                                        ***    111.41 %       ±0.78%  ±1.05%  ±1.37%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=2048 type='Uint16Array'                                                         ***    312.93 %       ±3.19%  ±4.29%  ±5.69%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=2048 type='Uint32Array'                                                         ***    105.57 %       ±1.28%  ±1.72%  ±2.26%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=2048 type='Uint8Array'                                                          ***    502.42 %       ±4.06%  ±5.47%  ±7.25%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=256 type='Float64Array'                                                         ***    497.94 %       ±3.79%  ±5.10%  ±6.77%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=256 type='Uint16Array'                                                          ***    651.85 %      ±10.90% ±14.69% ±19.49%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=256 type='Uint32Array'                                                          ***    509.04 %       ±5.29%  ±7.12%  ±9.42%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=256 type='Uint8Array'                                                           ***    701.88 %      ±10.76% ±14.49% ±19.22%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=64 type='Float64Array'                                                          ***    665.23 %       ±9.48% ±12.77% ±16.94%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=64 type='Uint16Array'                                                           ***    381.70 %      ±11.67% ±15.73% ±20.86%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=64 type='Uint32Array'                                                           ***    710.80 %      ±12.03% ±16.21% ±21.51%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset-length' len=64 type='Uint8Array'                                                            ***    376.08 %      ±10.07% ±13.57% ±18.01%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=2048 type='Float64Array'                                                               ***    111.04 %       ±0.58%  ±0.78%  ±1.02%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=2048 type='Uint16Array'                                                                ***    175.01 %       ±1.89%  ±2.53%  ±3.34%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=2048 type='Uint32Array'                                                                ***    115.13 %       ±1.24%  ±1.66%  ±2.19%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=2048 type='Uint8Array'                                                                 ***    373.05 %       ±3.27%  ±4.40%  ±5.84%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=256 type='Float64Array'                                                                ***    372.64 %       ±3.49%  ±4.70%  ±6.22%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=256 type='Uint16Array'                                                                 ***    613.67 %       ±7.69% ±10.35% ±13.72%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=256 type='Uint32Array'                                                                 ***    455.34 %       ±4.39%  ±5.92%  ±7.84%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=256 type='Uint8Array'                                                                  ***    714.09 %      ±11.31% ±15.24% ±20.21%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=64 type='Float64Array'                                                                 ***    606.34 %       ±7.55% ±10.16% ±13.47%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=64 type='Uint16Array'                                                                  ***    449.11 %       ±8.87% ±11.94% ±15.83%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=64 type='Uint32Array'                                                                  ***    718.27 %      ±10.63% ±14.31% ±18.99%
buffers/buffer-copy-bytes-from.js n=600000 partial='offset' len=64 type='Uint8Array'                                                                   ***    387.18 %       ±8.61% ±11.59% ±15.37%
buffers/buffer-copy.js n=6000000 partial='false' bytes=1024                                                                                                     0.95 %       ±2.26%  ±3.01%  ±3.92%
buffers/buffer-copy.js n=6000000 partial='false' bytes=128                                                                                                     -1.62 %       ±3.21%  ±4.27%  ±5.56%
buffers/buffer-copy.js n=6000000 partial='false' bytes=8                                                                                                        1.26 %       ±3.43%  ±4.57%  ±5.94%
buffers/buffer-copy.js n=6000000 partial='true' bytes=1024                                                                                                     -1.45 %       ±3.06%  ±4.10%  ±5.40%
buffers/buffer-copy.js n=6000000 partial='true' bytes=128                                                                                               **     -2.73 %       ±1.91%  ±2.55%  ±3.33%
buffers/buffer-copy.js n=6000000 partial='true' bytes=8                                                                                                         0.59 %       ±0.95%  ±1.26%  ±1.64%
buffers/buffer-creation.js n=600000 len=10 type='fast-alloc-fill'                                                                                              -1.65 %       ±4.50%  ±5.99%  ±7.79%
buffers/buffer-creation.js n=600000 len=10 type='fast-alloc'                                                                                                   -2.30 %       ±4.48%  ±5.95%  ±7.75%
buffers/buffer-creation.js n=600000 len=10 type='fast-allocUnsafe'                                                                                             -1.22 %       ±4.84%  ±6.44%  ±8.39%
buffers/buffer-creation.js n=600000 len=10 type='slow-allocUnsafe'                                                                                              0.58 %       ±4.37%  ±5.82%  ±7.58%
buffers/buffer-creation.js n=600000 len=1024 type='fast-alloc-fill'                                                                                            -0.41 %       ±0.90%  ±1.20%  ±1.57%
buffers/buffer-creation.js n=600000 len=1024 type='fast-alloc'                                                                                                  0.33 %       ±0.74%  ±0.98%  ±1.28%
buffers/buffer-creation.js n=600000 len=1024 type='fast-allocUnsafe'                                                                                           -0.96 %       ±1.41%  ±1.88%  ±2.45%
buffers/buffer-creation.js n=600000 len=1024 type='slow-allocUnsafe'                                                                                           -0.17 %       ±0.76%  ±1.01%  ±1.31%
buffers/buffer-creation.js n=600000 len=4096 type='fast-alloc-fill'                                                                                            -0.28 %       ±0.77%  ±1.03%  ±1.34%
buffers/buffer-creation.js n=600000 len=4096 type='fast-alloc'                                                                                                  0.45 %       ±0.99%  ±1.32%  ±1.73%
buffers/buffer-creation.js n=600000 len=4096 type='fast-allocUnsafe'                                                                                           -0.60 %       ±0.80%  ±1.07%  ±1.39%
buffers/buffer-creation.js n=600000 len=4096 type='slow-allocUnsafe'                                                                                           -0.33 %       ±0.80%  ±1.06%  ±1.39%
buffers/buffer-creation.js n=600000 len=8192 type='fast-alloc-fill'                                                                                            -0.63 %       ±0.69%  ±0.92%  ±1.20%
buffers/buffer-creation.js n=600000 len=8192 type='fast-alloc'                                                                                                  0.62 %       ±0.81%  ±1.08%  ±1.40%
buffers/buffer-creation.js n=600000 len=8192 type='fast-allocUnsafe'                                                                                           -0.37 %       ±0.75%  ±0.99%  ±1.29%
buffers/buffer-creation.js n=600000 len=8192 type='slow-allocUnsafe'                                                                                            0.64 %       ±0.98%  ±1.31%  ±1.71%
buffers/buffer-equals.js n=1000000 difflen='false' size=0                                                                                                      -0.92 %       ±1.69%  ±2.25%  ±2.93%
buffers/buffer-equals.js n=1000000 difflen='false' size=16386                                                                                          ***      6.85 %       ±3.42%  ±4.61%  ±6.12%
buffers/buffer-equals.js n=1000000 difflen='false' size=512                                                                                                     0.86 %       ±1.50%  ±1.99%  ±2.60%
buffers/buffer-equals.js n=1000000 difflen='true' size=0                                                                                                       -0.79 %       ±1.97%  ±2.62%  ±3.42%
buffers/buffer-equals.js n=1000000 difflen='true' size=16386                                                                                             *     -2.15 %       ±1.86%  ±2.50%  ±3.29%
buffers/buffer-equals.js n=1000000 difflen='true' size=512                                                                                                      1.36 %       ±1.61%  ±2.15%  ±2.81%
buffers/buffer-fill.js n=20000 size=65536 type='fill("")'                                                                                                      -0.44 %       ±4.18%  ±5.57%  ±7.25%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", "ascii")'                                                                                     **      4.98 %       ±3.10%  ±4.13%  ±5.38%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", "utf8")'                                                                                             -2.55 %       ±2.96%  ±3.94%  ±5.13%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", 0, "utf8")'                                                                                          -0.09 %       ±4.17%  ±5.55%  ±7.23%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", 0)'                                                                                                   0.11 %       ±1.69%  ±2.25%  ±2.93%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t")'                                                                                                      1.20 %       ±3.64%  ±4.85%  ±6.31%
buffers/buffer-fill.js n=20000 size=65536 type='fill("test")'                                                                                                  -1.32 %       ±3.68%  ±4.90%  ±6.38%
buffers/buffer-fill.js n=20000 size=65536 type='fill(0)'                                                                                                       -0.83 %       ±1.94%  ±2.59%  ±3.38%
buffers/buffer-fill.js n=20000 size=65536 type='fill(100)'                                                                                                     -0.84 %       ±2.20%  ±2.93%  ±3.82%
buffers/buffer-fill.js n=20000 size=65536 type='fill(400)'                                                                                                      0.27 %       ±1.80%  ±2.39%  ±3.12%
buffers/buffer-fill.js n=20000 size=65536 type='fill(Buffer.alloc(1), 0)'                                                                                      -1.94 %       ±2.47%  ±3.28%  ±4.27%
buffers/buffer-fill.js n=20000 size=8192 type='fill("")'                                                                                                       -2.03 %      ±10.14% ±13.49% ±17.55%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", "ascii")'                                                                                      **     21.70 %      ±13.96% ±18.61% ±24.29%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", "utf8")'                                                                                        *     -6.98 %       ±6.02%  ±8.11% ±10.75%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", 0, "utf8")'                                                                                           -3.17 %      ±11.20% ±14.90% ±19.40%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", 0)'                                                                                                    1.76 %       ±7.38%  ±9.84% ±12.86%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t")'                                                                                                      -1.60 %       ±9.75% ±12.97% ±16.89%
buffers/buffer-fill.js n=20000 size=8192 type='fill("test")'                                                                                                    1.42 %       ±7.95% ±10.59% ±13.82%
buffers/buffer-fill.js n=20000 size=8192 type='fill(0)'                                                                                                        -1.34 %       ±1.75%  ±2.33%  ±3.04%
buffers/buffer-fill.js n=20000 size=8192 type='fill(100)'                                                                                                      -0.75 %       ±1.93%  ±2.57%  ±3.35%
buffers/buffer-fill.js n=20000 size=8192 type='fill(400)'                                                                                                      -0.36 %       ±2.30%  ±3.06%  ±3.99%
buffers/buffer-fill.js n=20000 size=8192 type='fill(Buffer.alloc(1), 0)'                                                                                       -5.95 %      ±10.57% ±14.07% ±18.32%
buffers/buffer-from.js n=800000 len=100 source='array'                                                                                                         -1.07 %       ±1.72%  ±2.30%  ±2.99%
buffers/buffer-from.js n=800000 len=100 source='arraybuffer-middle'                                                                                            -0.79 %       ±3.71%  ±4.95%  ±6.44%
buffers/buffer-from.js n=800000 len=100 source='arraybuffer'                                                                                                   -1.80 %       ±4.34%  ±5.78%  ±7.52%
buffers/buffer-from.js n=800000 len=100 source='buffer'                                                                                                         1.33 %       ±2.64%  ±3.52%  ±4.58%
buffers/buffer-from.js n=800000 len=100 source='object'                                                                                                         2.72 %       ±3.64%  ±4.84%  ±6.31%
buffers/buffer-from.js n=800000 len=100 source='string-base64'                                                                                                  0.10 %       ±1.32%  ±1.76%  ±2.29%
buffers/buffer-from.js n=800000 len=100 source='string-utf8'                                                                                                   -0.73 %       ±2.25%  ±3.00%  ±3.91%
buffers/buffer-from.js n=800000 len=100 source='string'                                                                                                        -0.39 %       ±2.07%  ±2.75%  ±3.58%
buffers/buffer-from.js n=800000 len=100 source='uint16array'                                                                                                   -1.83 %       ±1.85%  ±2.46%  ±3.20%
buffers/buffer-from.js n=800000 len=100 source='uint8array'                                                                                                    -0.58 %       ±2.99%  ±3.98%  ±5.17%
buffers/buffer-from.js n=800000 len=2048 source='array'                                                                                                        -0.01 %       ±0.26%  ±0.35%  ±0.45%
buffers/buffer-from.js n=800000 len=2048 source='arraybuffer-middle'                                                                                     *     -3.66 %       ±3.22%  ±4.29%  ±5.59%
buffers/buffer-from.js n=800000 len=2048 source='arraybuffer'                                                                                                  -0.52 %       ±3.84%  ±5.12%  ±6.66%
buffers/buffer-from.js n=800000 len=2048 source='buffer'                                                                                                       -0.65 %       ±0.93%  ±1.24%  ±1.61%
buffers/buffer-from.js n=800000 len=2048 source='object'                                                                                                       -1.34 %       ±4.44%  ±5.92%  ±7.70%
buffers/buffer-from.js n=800000 len=2048 source='string-base64'                                                                                         **      0.92 %       ±0.55%  ±0.73%  ±0.96%
buffers/buffer-from.js n=800000 len=2048 source='string-utf8'                                                                                                  -0.55 %       ±0.87%  ±1.15%  ±1.50%
buffers/buffer-from.js n=800000 len=2048 source='string'                                                                                                       -0.65 %       ±0.68%  ±0.90%  ±1.17%
buffers/buffer-from.js n=800000 len=2048 source='uint16array'                                                                                            *     -0.79 %       ±0.79%  ±1.05%  ±1.37%
buffers/buffer-from.js n=800000 len=2048 source='uint8array'                                                                                                   -0.81 %       ±1.14%  ±1.52%  ±1.98%
buffers/buffer-hex-decode.js n=1000000 len=1024                                                                                                        ***     -1.21 %       ±0.50%  ±0.66%  ±0.87%
buffers/buffer-hex-decode.js n=1000000 len=64                                                                                                           **     -2.24 %       ±1.42%  ±1.89%  ±2.46%
buffers/buffer-hex-encode.js n=1000000 len=1024                                                                                                        ***      0.35 %       ±0.16%  ±0.21%  ±0.27%
buffers/buffer-hex-encode.js n=1000000 len=64                                                                                                                  -0.10 %       ±1.25%  ±1.67%  ±2.19%
buffers/buffer-indexof-number.js n=1000000 value=64                                                                                                            -1.56 %       ±2.41%  ±3.21%  ±4.18%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='--l'                                                                        *      0.65 %       ±0.61%  ±0.81%  ±1.06%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='@'                                                                                 1.63 %       ±8.75% ±11.64% ±15.16%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='</i> to the Caterpillar'                                                  ***      0.69 %       ±0.06%  ±0.08%  ±0.11%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='aaaaaaaaaaaaaaaaa'                                                        ***      3.13 %       ±0.10%  ±0.13%  ±0.17%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='Alice'                                                                            10.77 %      ±13.16% ±17.52% ±22.82%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='found it very'                                                            ***      0.54 %       ±0.03%  ±0.04%  ±0.05%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='Gryphon'                                                                           0.12 %       ±1.03%  ±1.38%  ±1.82%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='neighbouring pool'                                                        ***      2.30 %       ±0.05%  ±0.07%  ±0.09%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='Ou est ma chatte?'                                                        ***     -0.40 %       ±0.17%  ±0.23%  ±0.29%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='SQ'                                                                        **      3.99 %       ±2.51%  ±3.35%  ±4.38%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='venture to go near the house till she had brought herself down to'                -0.66 %       ±1.27%  ±1.71%  ±2.27%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='--l'                                                                          ***      5.04 %       ±1.81%  ±2.44%  ±3.22%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='@'                                                                            ***     43.66 %       ±4.16%  ±5.55%  ±7.26%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='</i> to the Caterpillar'                                                      ***      6.00 %       ±2.41%  ±3.22%  ±4.23%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='aaaaaaaaaaaaaaaaa'                                                            ***      8.84 %       ±2.72%  ±3.63%  ±4.76%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='Alice'                                                                        ***     61.21 %       ±7.70% ±10.27% ±13.39%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='found it very'                                                                ***      3.10 %       ±1.22%  ±1.63%  ±2.13%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='Gryphon'                                                                      ***      8.08 %       ±1.54%  ±2.08%  ±2.76%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='neighbouring pool'                                                            ***      5.49 %       ±1.71%  ±2.29%  ±3.01%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='Ou est ma chatte?'                                                              *      0.23 %       ±0.21%  ±0.28%  ±0.36%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='SQ'                                                                                    2.53 %       ±2.58%  ±3.44%  ±4.47%
buffers/buffer-indexof.js n=50000 type='string' encoding='ascii' search='venture to go near the house till she had brought herself down to'            ***      7.63 %       ±3.45%  ±4.60%  ±6.03%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='--l'                                                                                 -1.17 %       ±1.25%  ±1.68%  ±2.22%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='@'                                                                                    4.47 %       ±6.08%  ±8.09% ±10.54%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='</i> to the Caterpillar'                                                              0.44 %       ±0.97%  ±1.29%  ±1.68%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='aaaaaaaaaaaaaaaaa'                                                           ***      4.03 %       ±1.06%  ±1.42%  ±1.87%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='Alice'                                                                               -0.95 %       ±5.86%  ±7.83% ±10.26%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='found it very'                                                                 *      0.89 %       ±0.87%  ±1.16%  ±1.51%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='Gryphon'                                                                             -1.32 %       ±1.51%  ±2.02%  ±2.63%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='neighbouring pool'                                                           ***      2.24 %       ±0.91%  ±1.22%  ±1.58%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='Ou est ma chatte?'                                                           ***     -0.25 %       ±0.11%  ±0.14%  ±0.18%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='SQ'                                                                                  -2.82 %       ±3.31%  ±4.41%  ±5.77%
buffers/buffer-indexof.js n=50000 type='string' encoding='latin1' search='venture to go near the house till she had brought herself down to'                   -1.06 %       ±1.91%  ±2.56%  ±3.35%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='--l'                                                                                    0.05 %       ±1.33%  ±1.77%  ±2.31%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='@'                                                                                      4.50 %       ±6.43%  ±8.56% ±11.15%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='</i> to the Caterpillar'                                                               -0.58 %       ±3.17%  ±4.22%  ±5.50%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='aaaaaaaaaaaaaaaaa'                                                              **     -4.62 %       ±2.82%  ±3.78%  ±4.99%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='Alice'                                                                                  4.63 %       ±5.95%  ±7.93% ±10.35%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='found it very'                                                                 ***     -0.95 %       ±0.32%  ±0.42%  ±0.55%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='Gryphon'                                                                               -0.60 %       ±1.04%  ±1.40%  ±1.86%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='neighbouring pool'                                                                     -1.00 %       ±1.24%  ±1.66%  ±2.20%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='Ou est ma chatte?'                                                                      2.40 %       ±2.68%  ±3.59%  ±4.71%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='SQ'                                                                                     0.44 %       ±1.59%  ±2.12%  ±2.76%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='venture to go near the house till she had brought herself down to'                     -1.07 %       ±1.91%  ±2.55%  ±3.32%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='--l'                                                                                   -0.13 %       ±0.42%  ±0.56%  ±0.73%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='@'                                                                                     -1.64 %       ±6.34%  ±8.43% ±10.98%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='</i> to the Caterpillar'                                                               -1.52 %       ±1.81%  ±2.43%  ±3.21%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='aaaaaaaaaaaaaaaaa'                                                                      1.95 %       ±2.22%  ±2.95%  ±3.85%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='Alice'                                                                                  1.76 %       ±8.65% ±11.52% ±14.99%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='found it very'                                                                  **      1.38 %       ±0.88%  ±1.18%  ±1.56%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='Gryphon'                                                                                0.40 %       ±1.19%  ±1.60%  ±2.09%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='neighbouring pool'                                                              **      2.23 %       ±1.51%  ±2.00%  ±2.61%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='Ou est ma chatte?'                                                             ***     -0.80 %       ±0.15%  ±0.20%  ±0.26%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='SQ'                                                                                     0.08 %       ±2.88%  ±3.84%  ±5.00%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='venture to go near the house till she had brought herself down to'                     -0.15 %       ±2.30%  ±3.07%  ±3.99%
buffers/buffer-isascii.js input='hello world' length='long' n=20000000                                                                                  **     -5.05 %       ±3.27%  ±4.35%  ±5.66%
buffers/buffer-isascii.js input='hello world' length='short' n=20000000                                                                                         0.17 %       ±2.53%  ±3.37%  ±4.39%
buffers/buffer-isutf8.js input='∀x∈ℝ: ⌈x⌉ = −⌊−x⌋' length='long' n=20000000                                                                                    -0.05 %       ±0.10%  ±0.14%  ±0.18%
buffers/buffer-isutf8.js input='∀x∈ℝ: ⌈x⌉ = −⌊−x⌋' length='short' n=20000000                                                                                   -0.12 %       ±1.53%  ±2.05%  ±2.68%
buffers/buffer-isutf8.js input='regular string' length='long' n=20000000                                                                                        1.65 %       ±2.50%  ±3.33%  ±4.34%
buffers/buffer-isutf8.js input='regular string' length='short' n=20000000                                                                                      -0.29 %       ±0.53%  ±0.71%  ±0.93%
buffers/buffer-iterate.js n=1000 method='for' type='fast' size=16386                                                                                            1.12 %       ±3.92%  ±5.22%  ±6.80%
buffers/buffer-iterate.js n=1000 method='for' type='fast' size=4096                                                                                             0.19 %       ±8.87% ±11.80% ±15.36%
buffers/buffer-iterate.js n=1000 method='for' type='fast' size=512                                                                                             -7.45 %      ±18.15% ±24.15% ±31.44%
buffers/buffer-iterate.js n=1000 method='forOf' type='fast' size=16386                                                                                   *     -1.65 %       ±1.55%  ±2.06%  ±2.68%
buffers/buffer-iterate.js n=1000 method='forOf' type='fast' size=4096                                                                                           2.28 %       ±5.13%  ±6.82%  ±8.88%
buffers/buffer-iterate.js n=1000 method='forOf' type='fast' size=512                                                                                           -7.78 %      ±12.16% ±16.18% ±21.06%
buffers/buffer-iterate.js n=1000 method='iterator' type='fast' size=16386                                                                                *      1.40 %       ±1.26%  ±1.69%  ±2.21%
buffers/buffer-iterate.js n=1000 method='iterator' type='fast' size=4096                                                                                       -0.33 %       ±3.57%  ±4.76%  ±6.19%
buffers/buffer-iterate.js n=1000 method='iterator' type='fast' size=512                                                                                        -0.88 %      ±12.37% ±16.46% ±21.42%
buffers/buffer-normalize-encoding.js n=1000000 encoding='ascii'                                                                                                 2.56 %       ±4.48%  ±5.96%  ±7.75%
buffers/buffer-normalize-encoding.js n=1000000 encoding='base64'                                                                                         *     -2.18 %       ±1.99%  ±2.67%  ±3.52%
buffers/buffer-normalize-encoding.js n=1000000 encoding='BASE64'                                                                                                0.99 %       ±4.78%  ±6.35%  ±8.27%
buffers/buffer-normalize-encoding.js n=1000000 encoding='binary'                                                                                               -4.69 %       ±5.08%  ±6.76%  ±8.80%
buffers/buffer-normalize-encoding.js n=1000000 encoding='hex'                                                                                            *      1.20 %       ±0.94%  ±1.25%  ±1.62%
buffers/buffer-normalize-encoding.js n=1000000 encoding='HEX'                                                                                                  -4.77 %       ±4.86%  ±6.47%  ±8.43%
buffers/buffer-normalize-encoding.js n=1000000 encoding='latin1'                                                                                               -1.86 %       ±4.74%  ±6.31%  ±8.21%
buffers/buffer-normalize-encoding.js n=1000000 encoding='LATIN1'                                                                                               -2.14 %       ±3.79%  ±5.05%  ±6.58%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UCS-2'                                                                                                 0.06 %       ±3.02%  ±4.03%  ±5.26%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UCS2'                                                                                                  0.44 %       ±4.50%  ±5.99%  ±7.80%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf-16le'                                                                                              0.15 %       ±1.94%  ±2.58%  ±3.36%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UTF-16LE'                                                                                             -0.97 %       ±4.37%  ±5.82%  ±7.58%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf-8'                                                                                                -0.20 %       ±1.12%  ±1.49%  ±1.94%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf16le'                                                                                              -0.19 %       ±1.26%  ±1.68%  ±2.18%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UTF16LE'                                                                                              -1.01 %       ±4.58%  ±6.10%  ±7.93%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf8'                                                                                                 -0.13 %       ±0.86%  ±1.14%  ±1.49%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UTF8'                                                                                                  0.98 %       ±2.36%  ±3.14%  ±4.09%
buffers/buffer-read-float.js n=1000000 value='big' endian='LE' type='Double'                                                                                    7.21 %      ±16.41% ±21.83% ±28.41%
buffers/buffer-read-float.js n=1000000 value='big' endian='LE' type='Float'                                                                                    -6.46 %      ±16.46% ±21.91% ±28.54%
buffers/buffer-read-float.js n=1000000 value='inf' endian='LE' type='Double'                                                                                    2.28 %      ±17.22% ±22.91% ±29.81%
buffers/buffer-read-float.js n=1000000 value='inf' endian='LE' type='Float'                                                                                   -12.58 %      ±15.23% ±20.31% ±26.52%
buffers/buffer-read-float.js n=1000000 value='nan' endian='LE' type='Double'                                                                                    9.45 %      ±17.54% ±23.34% ±30.38%
buffers/buffer-read-float.js n=1000000 value='nan' endian='LE' type='Float'                                                                                    -5.40 %      ±16.34% ±21.74% ±28.30%
buffers/buffer-read-float.js n=1000000 value='small' endian='LE' type='Double'                                                                                 15.09 %      ±17.83% ±23.73% ±30.88%
buffers/buffer-read-float.js n=1000000 value='small' endian='LE' type='Float'                                                                            *    -18.01 %      ±16.23% ±21.64% ±28.24%
buffers/buffer-read-float.js n=1000000 value='zero' endian='LE' type='Double'                                                                                  -5.39 %      ±12.47% ±16.60% ±21.60%
buffers/buffer-read-float.js n=1000000 value='zero' endian='LE' type='Float'                                                                                   -5.39 %      ±15.77% ±20.98% ±27.31%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='IntBE' buffer='fast'                                                                        1.38 %      ±13.73% ±18.27% ±23.78%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='IntLE' buffer='fast'                                                                        4.58 %      ±11.96% ±15.92% ±20.72%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='UIntBE' buffer='fast'                                                                      -8.93 %      ±11.07% ±14.74% ±19.20%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='UIntLE' buffer='fast'                                                                       5.89 %      ±11.51% ±15.32% ±19.95%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='IntBE' buffer='fast'                                                                       -0.32 %      ±15.47% ±20.58% ±26.78%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='IntLE' buffer='fast'                                                                        0.81 %      ±14.73% ±19.60% ±25.51%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='UIntBE' buffer='fast'                                                                *    -12.71 %      ±11.74% ±15.64% ±20.38%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='UIntLE' buffer='fast'                                                                       1.37 %      ±14.58% ±19.39% ±25.24%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='IntBE' buffer='fast'                                                                **    -18.22 %      ±12.29% ±16.36% ±21.30%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='IntLE' buffer='fast'                                                                       -0.51 %      ±14.87% ±19.79% ±25.76%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='UIntBE' buffer='fast'                                                                       3.70 %      ±15.40% ±20.49% ±26.67%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='UIntLE' buffer='fast'                                                                      -2.07 %       ±5.14%  ±6.85%  ±8.93%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='IntBE' buffer='fast'                                                                        5.43 %      ±15.19% ±20.21% ±26.30%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='IntLE' buffer='fast'                                                                       -0.73 %      ±14.70% ±19.56% ±25.46%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='UIntBE' buffer='fast'                                                                       4.64 %      ±15.09% ±20.07% ±26.13%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='UIntLE' buffer='fast'                                                                       1.42 %      ±15.12% ±20.11% ±26.18%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='IntBE' buffer='fast'                                                                       -5.92 %      ±10.04% ±13.36% ±17.40%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='IntLE' buffer='fast'                                                                        3.49 %      ±11.23% ±14.95% ±19.47%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='UIntBE' buffer='fast'                                                                      -7.02 %      ±10.80% ±14.37% ±18.70%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='UIntLE' buffer='fast'                                                                      -5.10 %       ±7.65% ±10.20% ±13.32%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='IntBE' buffer='fast'                                                                       -7.80 %       ±8.74% ±11.65% ±15.21%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='IntLE' buffer='fast'                                                                 *     11.49 %       ±8.73% ±11.68% ±15.36%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='UIntBE' buffer='fast'                                                                       0.96 %      ±10.21% ±13.58% ±17.68%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='UIntLE' buffer='fast'                                                                *     -9.55 %       ±7.72% ±10.33% ±13.58%
buffers/buffer-read.js n=1000000 type='BigInt64BE' buffer='fast'                                                                                               -4.08 %       ±6.98%  ±9.29% ±12.09%
buffers/buffer-read.js n=1000000 type='BigInt64LE' buffer='fast'                                                                                         *     -6.83 %       ±6.12%  ±8.15% ±10.60%
buffers/buffer-read.js n=1000000 type='BigUInt64BE' buffer='fast'                                                                                               4.68 %      ±15.36% ±20.44% ±26.61%
buffers/buffer-read.js n=1000000 type='BigUInt64LE' buffer='fast'                                                                                              -1.85 %      ±17.74% ±23.61% ±30.73%
buffers/buffer-read.js n=1000000 type='Int16BE' buffer='fast'                                                                                                  -4.82 %      ±18.04% ±24.01% ±31.25%
buffers/buffer-read.js n=1000000 type='Int16LE' buffer='fast'                                                                                                  11.15 %      ±19.96% ±26.55% ±34.57%
buffers/buffer-read.js n=1000000 type='Int32BE' buffer='fast'                                                                                                   0.06 %      ±19.98% ±26.58% ±34.59%
buffers/buffer-read.js n=1000000 type='Int32LE' buffer='fast'                                                                                                  -1.80 %      ±15.50% ±20.63% ±26.85%
buffers/buffer-read.js n=1000000 type='Int8' buffer='fast'                                                                                             ***    -30.48 %      ±16.47% ±21.91% ±28.52%
buffers/buffer-read.js n=1000000 type='UInt16BE' buffer='fast'                                                                                           *    -20.13 %      ±17.30% ±23.01% ±29.95%
buffers/buffer-read.js n=1000000 type='UInt16LE' buffer='fast'                                                                                                 -7.60 %      ±19.65% ±26.15% ±34.03%
buffers/buffer-read.js n=1000000 type='UInt32BE' buffer='fast'                                                                                                -10.01 %      ±17.90% ±23.81% ±30.99%
buffers/buffer-read.js n=1000000 type='UInt32LE' buffer='fast'                                                                                                -11.95 %      ±18.05% ±24.02% ±31.26%
buffers/buffer-read.js n=1000000 type='UInt8' buffer='fast'                                                                                                    -6.65 %      ±14.81% ±19.70% ±25.65%
buffers/buffer-slice.js n=1000000 type='fast'                                                                                                                   1.77 %       ±3.53%  ±4.71%  ±6.15%
buffers/buffer-slice.js n=1000000 type='slow'                                                                                                                  -1.91 %       ±3.50%  ±4.66%  ±6.06%
buffers/buffer-slice.js n=1000000 type='subarray'                                                                                                               0.34 %       ±2.95%  ±3.92%  ±5.11%
buffers/buffer-swap.js n=1000000 len=1024 method='swap16' aligned='false'                                                                              ***      9.45 %       ±2.48%  ±3.33%  ±4.40%
buffers/buffer-swap.js n=1000000 len=1024 method='swap16' aligned='true'                                                                               ***      9.72 %       ±2.55%  ±3.42%  ±4.52%
buffers/buffer-swap.js n=1000000 len=1024 method='swap32' aligned='false'                                                                              ***     12.13 %       ±0.53%  ±0.70%  ±0.91%
buffers/buffer-swap.js n=1000000 len=1024 method='swap32' aligned='true'                                                                               ***     12.52 %       ±0.43%  ±0.57%  ±0.75%
buffers/buffer-swap.js n=1000000 len=1024 method='swap64' aligned='false'                                                                              ***     14.21 %       ±0.60%  ±0.80%  ±1.05%
buffers/buffer-swap.js n=1000000 len=1024 method='swap64' aligned='true'                                                                               ***     15.67 %       ±0.53%  ±0.71%  ±0.92%
buffers/buffer-swap.js n=1000000 len=2056 method='swap16' aligned='false'                                                                              ***     12.22 %       ±0.65%  ±0.86%  ±1.13%
buffers/buffer-swap.js n=1000000 len=2056 method='swap16' aligned='true'                                                                               ***     12.58 %       ±0.67%  ±0.90%  ±1.17%
buffers/buffer-swap.js n=1000000 len=2056 method='swap32' aligned='false'                                                                              ***      6.16 %       ±0.50%  ±0.67%  ±0.88%
buffers/buffer-swap.js n=1000000 len=2056 method='swap32' aligned='true'                                                                               ***      6.30 %       ±0.19%  ±0.25%  ±0.32%
buffers/buffer-swap.js n=1000000 len=2056 method='swap64' aligned='false'                                                                              ***      9.07 %       ±0.41%  ±0.55%  ±0.71%
buffers/buffer-swap.js n=1000000 len=2056 method='swap64' aligned='true'                                                                               ***      9.81 %       ±0.29%  ±0.39%  ±0.51%
buffers/buffer-swap.js n=1000000 len=256 method='swap16' aligned='false'                                                                               ***     35.37 %       ±1.61%  ±2.14%  ±2.79%
buffers/buffer-swap.js n=1000000 len=256 method='swap16' aligned='true'                                                                                ***     34.07 %       ±1.52%  ±2.03%  ±2.64%
buffers/buffer-swap.js n=1000000 len=256 method='swap32' aligned='false'                                                                               ***      4.87 %       ±1.27%  ±1.69%  ±2.21%
buffers/buffer-swap.js n=1000000 len=256 method='swap32' aligned='true'                                                                                ***      4.60 %       ±1.18%  ±1.57%  ±2.04%
buffers/buffer-swap.js n=1000000 len=256 method='swap64' aligned='false'                                                                               ***     26.76 %       ±2.90%  ±3.89%  ±5.14%
buffers/buffer-swap.js n=1000000 len=256 method='swap64' aligned='true'                                                                                ***     26.25 %       ±2.63%  ±3.52%  ±4.62%
buffers/buffer-swap.js n=1000000 len=64 method='swap16' aligned='false'                                                                                  *     -0.99 %       ±0.98%  ±1.31%  ±1.71%
buffers/buffer-swap.js n=1000000 len=64 method='swap16' aligned='true'                                                                                          1.55 %       ±2.22%  ±2.96%  ±3.85%
buffers/buffer-swap.js n=1000000 len=64 method='swap32' aligned='false'                                                                                 **     -0.98 %       ±0.71%  ±0.94%  ±1.23%
buffers/buffer-swap.js n=1000000 len=64 method='swap32' aligned='true'                                                                                  **     -0.65 %       ±0.44%  ±0.59%  ±0.76%
buffers/buffer-swap.js n=1000000 len=64 method='swap64' aligned='false'                                                                                ***      3.04 %       ±1.13%  ±1.51%  ±1.96%
buffers/buffer-swap.js n=1000000 len=64 method='swap64' aligned='true'                                                                                 ***      3.55 %       ±0.81%  ±1.08%  ±1.41%
buffers/buffer-swap.js n=1000000 len=768 method='swap16' aligned='false'                                                                               ***      5.92 %       ±1.05%  ±1.40%  ±1.83%
buffers/buffer-swap.js n=1000000 len=768 method='swap16' aligned='true'                                                                                ***      5.83 %       ±1.16%  ±1.54%  ±2.01%
buffers/buffer-swap.js n=1000000 len=768 method='swap32' aligned='false'                                                                               ***     13.96 %       ±0.60%  ±0.80%  ±1.04%
buffers/buffer-swap.js n=1000000 len=768 method='swap32' aligned='true'                                                                                ***     15.41 %       ±0.67%  ±0.89%  ±1.16%
buffers/buffer-swap.js n=1000000 len=768 method='swap64' aligned='false'                                                                               ***     17.77 %       ±0.66%  ±0.88%  ±1.14%
buffers/buffer-swap.js n=1000000 len=768 method='swap64' aligned='true'                                                                                ***     18.52 %       ±0.86%  ±1.14%  ±1.48%
buffers/buffer-swap.js n=1000000 len=8192 method='swap16' aligned='false'                                                                              ***      7.70 %       ±0.32%  ±0.43%  ±0.57%
buffers/buffer-swap.js n=1000000 len=8192 method='swap16' aligned='true'                                                                               ***      7.70 %       ±0.29%  ±0.39%  ±0.51%
buffers/buffer-swap.js n=1000000 len=8192 method='swap32' aligned='false'                                                                              ***      1.85 %       ±0.06%  ±0.08%  ±0.10%
buffers/buffer-swap.js n=1000000 len=8192 method='swap32' aligned='true'                                                                               ***      1.83 %       ±0.05%  ±0.07%  ±0.09%
buffers/buffer-swap.js n=1000000 len=8192 method='swap64' aligned='false'                                                                              ***      2.91 %       ±0.11%  ±0.15%  ±0.19%
buffers/buffer-swap.js n=1000000 len=8192 method='swap64' aligned='true'                                                                               ***      3.10 %       ±0.10%  ±0.13%  ±0.17%
buffers/buffer-tojson.js len=0 n=10000                                                                                                                        -14.64 %      ±19.08% ±25.40% ±33.11%
buffers/buffer-tojson.js len=256 n=10000                                                                                                                        1.26 %       ±3.13%  ±4.20%  ±5.54%
buffers/buffer-tojson.js len=4096 n=10000                                                                                                              ***      8.06 %       ±1.30%  ±1.74%  ±2.27%
buffers/buffer-tostring.js n=1000000 len=1 args=0 encoding=''                                                                                          ***      5.81 %       ±2.34%  ±3.11%  ±4.06%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='ascii'                                                                                             -1.22 %       ±2.82%  ±3.76%  ±4.91%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='base64'                                                                                    ***     -3.60 %       ±1.84%  ±2.45%  ±3.20%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='base64url'                                                                                         -0.39 %       ±2.07%  ±2.76%  ±3.60%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='hex'                                                                                               -0.89 %       ±2.39%  ±3.18%  ±4.15%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='latin1'                                                                                             2.67 %       ±3.40%  ±4.53%  ±5.90%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='UCS-2'                                                                                             -0.18 %       ±1.95%  ±2.60%  ±3.39%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='utf8'                                                                                       **      3.80 %       ±2.36%  ±3.14%  ±4.10%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='ascii'                                                                                     ***      5.66 %       ±3.18%  ±4.23%  ±5.51%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='base64'                                                                                            -1.16 %       ±1.29%  ±1.72%  ±2.25%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='base64url'                                                                                          1.79 %       ±2.44%  ±3.25%  ±4.24%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='hex'                                                                                         *     -2.91 %       ±2.45%  ±3.26%  ±4.25%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='latin1'                                                                                             0.96 %       ±2.71%  ±3.62%  ±4.72%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='UCS-2'                                                                                      **     -1.73 %       ±1.24%  ±1.65%  ±2.15%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='utf8'                                                                                      ***      5.63 %       ±2.66%  ±3.54%  ±4.61%
buffers/buffer-tostring.js n=1000000 len=1024 args=0 encoding=''                                                                                        **      2.09 %       ±1.25%  ±1.67%  ±2.17%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='ascii'                                                                                   **      2.45 %       ±1.70%  ±2.28%  ±3.00%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='base64'                                                                                         -0.57 %       ±0.61%  ±0.81%  ±1.05%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='base64url'                                                                                      -0.31 %       ±0.75%  ±1.00%  ±1.31%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='hex'                                                                                            -0.45 %       ±0.67%  ±0.89%  ±1.16%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='latin1'                                                                                         -0.64 %       ±2.18%  ±2.93%  ±3.85%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='UCS-2'                                                                                          -0.07 %       ±1.02%  ±1.36%  ±1.77%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='utf8'                                                                                            0.70 %       ±0.83%  ±1.10%  ±1.43%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='ascii'                                                                                   **      1.40 %       ±0.93%  ±1.24%  ±1.61%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='base64'                                                                                          0.01 %       ±0.60%  ±0.80%  ±1.04%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='base64url'                                                                                       0.25 %       ±0.78%  ±1.03%  ±1.35%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='hex'                                                                                      *      0.60 %       ±0.57%  ±0.76%  ±1.00%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='latin1'                                                                                          0.16 %       ±1.23%  ±1.64%  ±2.13%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='UCS-2'                                                                                          -0.32 %       ±0.80%  ±1.07%  ±1.40%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='utf8'                                                                                            0.91 %       ±1.05%  ±1.40%  ±1.82%
buffers/buffer-tostring.js n=1000000 len=64 args=0 encoding=''                                                                                         ***      6.02 %       ±1.52%  ±2.03%  ±2.64%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='ascii'                                                                                             1.72 %       ±2.06%  ±2.75%  ±3.58%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='base64'                                                                                           -1.23 %       ±1.56%  ±2.07%  ±2.70%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='base64url'                                                                                        -0.85 %       ±2.13%  ±2.83%  ±3.69%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='hex'                                                                                      ***     -3.65 %       ±1.96%  ±2.61%  ±3.39%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='latin1'                                                                                           -1.32 %       ±2.85%  ±3.79%  ±4.94%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='UCS-2'                                                                                            -0.62 %       ±1.31%  ±1.75%  ±2.27%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='utf8'                                                                                      **      2.57 %       ±1.82%  ±2.44%  ±3.19%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='ascii'                                                                                    ***      4.05 %       ±1.83%  ±2.44%  ±3.18%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='base64'                                                                                           -0.93 %       ±1.25%  ±1.67%  ±2.17%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='base64url'                                                                                        -0.65 %       ±1.85%  ±2.47%  ±3.21%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='hex'                                                                                        *     -2.01 %       ±1.73%  ±2.30%  ±2.99%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='latin1'                                                                                           -1.51 %       ±1.59%  ±2.13%  ±2.81%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='UCS-2'                                                                                    ***     -1.90 %       ±1.02%  ±1.36%  ±1.78%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='utf8'                                                                                     ***      6.32 %       ±2.91%  ±3.88%  ±5.05%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ascii' fromEncoding='ascii'                                                                          -0.76 %       ±1.58%  ±2.10%  ±2.74%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ascii' fromEncoding='latin1'                                                                         -0.42 %       ±1.45%  ±1.92%  ±2.50%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ascii' fromEncoding='ucs2'                                                                            0.37 %       ±1.60%  ±2.13%  ±2.77%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ascii' fromEncoding='utf8'                                                                            0.20 %       ±1.79%  ±2.38%  ±3.10%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='latin1' fromEncoding='ascii'                                                                   *     -1.69 %       ±1.40%  ±1.86%  ±2.43%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='latin1' fromEncoding='latin1'                                                                        -0.61 %       ±1.03%  ±1.37%  ±1.79%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='latin1' fromEncoding='ucs2'                                                                          -0.28 %       ±1.82%  ±2.42%  ±3.15%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='latin1' fromEncoding='utf8'                                                                           0.62 %       ±1.74%  ±2.31%  ±3.01%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ucs2' fromEncoding='ascii'                                                                     *     -1.46 %       ±1.38%  ±1.84%  ±2.39%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ucs2' fromEncoding='latin1'                                                                          -1.00 %       ±1.90%  ±2.52%  ±3.29%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ucs2' fromEncoding='ucs2'                                                                            -1.19 %       ±1.52%  ±2.02%  ±2.62%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='ucs2' fromEncoding='utf8'                                                                     **     -2.07 %       ±1.55%  ±2.06%  ±2.69%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='utf8' fromEncoding='ascii'                                                                           -0.22 %       ±1.45%  ±1.93%  ±2.52%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='utf8' fromEncoding='latin1'                                                                          -0.97 %       ±1.59%  ±2.12%  ±2.76%
buffers/buffer-transcode.js n=100000 length=1 toEncoding='utf8' fromEncoding='utf8'                                                                     **      1.86 %       ±1.28%  ±1.70%  ±2.22%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ascii' fromEncoding='ascii'                                                                         -0.18 %       ±1.62%  ±2.16%  ±2.82%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ascii' fromEncoding='latin1'                                                                        -0.30 %       ±1.55%  ±2.06%  ±2.69%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ascii' fromEncoding='ucs2'                                                                   **     -1.96 %       ±1.37%  ±1.82%  ±2.37%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ascii' fromEncoding='utf8'                                                                           1.00 %       ±1.58%  ±2.10%  ±2.73%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='latin1' fromEncoding='ascii'                                                                         0.14 %       ±1.45%  ±1.93%  ±2.51%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='latin1' fromEncoding='latin1'                                                                        0.89 %       ±1.30%  ±1.74%  ±2.27%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='latin1' fromEncoding='ucs2'                                                                  **     -2.27 %       ±1.57%  ±2.10%  ±2.73%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='latin1' fromEncoding='utf8'                                                                          0.42 %       ±1.69%  ±2.25%  ±2.93%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ucs2' fromEncoding='ascii'                                                                          -1.18 %       ±1.58%  ±2.10%  ±2.74%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ucs2' fromEncoding='latin1'                                                                         -1.22 %       ±1.87%  ±2.48%  ±3.23%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ucs2' fromEncoding='ucs2'                                                                            0.87 %       ±1.67%  ±2.22%  ±2.89%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='ucs2' fromEncoding='utf8'                                                                           -1.06 %       ±1.72%  ±2.29%  ±2.98%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='utf8' fromEncoding='ascii'                                                                          -1.41 %       ±1.61%  ±2.14%  ±2.78%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='utf8' fromEncoding='latin1'                                                                          0.49 %       ±1.72%  ±2.29%  ±2.98%
buffers/buffer-transcode.js n=100000 length=10 toEncoding='utf8' fromEncoding='utf8'                                                                    **     -2.88 %       ±1.73%  ±2.31%  ±3.01%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ascii' fromEncoding='ascii'                                                                       -0.06 %       ±1.12%  ±1.50%  ±1.95%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ascii' fromEncoding='latin1'                                                                *      1.50 %       ±1.27%  ±1.69%  ±2.20%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ascii' fromEncoding='ucs2'                                                                ***     -1.19 %       ±0.19%  ±0.26%  ±0.33%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ascii' fromEncoding='utf8'                                                                         1.02 %       ±1.42%  ±1.88%  ±2.45%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='latin1' fromEncoding='ascii'                                                                       0.95 %       ±1.14%  ±1.52%  ±1.98%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='latin1' fromEncoding='latin1'                                                               *      1.21 %       ±1.08%  ±1.44%  ±1.87%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='latin1' fromEncoding='ucs2'                                                               ***     -1.08 %       ±0.26%  ±0.35%  ±0.45%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='latin1' fromEncoding='utf8'                                                                **      1.57 %       ±1.17%  ±1.56%  ±2.03%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ucs2' fromEncoding='ascii'                                                                        -0.71 %       ±0.94%  ±1.25%  ±1.63%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ucs2' fromEncoding='latin1'                                                                       -0.40 %       ±0.96%  ±1.28%  ±1.67%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ucs2' fromEncoding='ucs2'                                                                          0.39 %       ±0.75%  ±0.99%  ±1.29%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='ucs2' fromEncoding='utf8'                                                                          0.53 %       ±1.01%  ±1.34%  ±1.75%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='utf8' fromEncoding='ascii'                                                                         0.11 %       ±0.74%  ±0.99%  ±1.29%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='utf8' fromEncoding='latin1'                                                                        0.03 %       ±0.77%  ±1.02%  ±1.33%
buffers/buffer-transcode.js n=100000 length=1000 toEncoding='utf8' fromEncoding='utf8'                                                                          0.06 %       ±0.73%  ±0.97%  ±1.26%
buffers/buffer-write-string-short.js n=1000000 len=1 encoding='ascii'                                                                                          -1.42 %       ±3.73%  ±4.97%  ±6.47%
buffers/buffer-write-string-short.js n=1000000 len=1 encoding='latin1'                                                                                          2.65 %       ±3.54%  ±4.72%  ±6.14%
buffers/buffer-write-string-short.js n=1000000 len=1 encoding='utf8'                                                                                    **     -4.98 %       ±2.94%  ±3.92%  ±5.12%
buffers/buffer-write-string-short.js n=1000000 len=16 encoding='ascii'                                                                                         -2.69 %       ±3.76%  ±5.00%  ±6.51%
buffers/buffer-write-string-short.js n=1000000 len=16 encoding='latin1'                                                                                        -1.23 %       ±3.78%  ±5.05%  ±6.62%
buffers/buffer-write-string-short.js n=1000000 len=16 encoding='utf8'                                                                                          -2.89 %       ±3.91%  ±5.20%  ±6.78%
buffers/buffer-write-string-short.js n=1000000 len=32 encoding='ascii'                                                                                          0.52 %       ±4.04%  ±5.38%  ±7.01%
buffers/buffer-write-string-short.js n=1000000 len=32 encoding='latin1'                                                                                         3.31 %       ±3.63%  ±4.83%  ±6.28%
buffers/buffer-write-string-short.js n=1000000 len=32 encoding='utf8'                                                                                          -1.69 %       ±3.26%  ±4.35%  ±5.67%
buffers/buffer-write-string-short.js n=1000000 len=8 encoding='ascii'                                                                                           0.01 %       ±3.47%  ±4.62%  ±6.02%
buffers/buffer-write-string-short.js n=1000000 len=8 encoding='latin1'                                                                                          0.01 %       ±3.85%  ±5.12%  ±6.66%
buffers/buffer-write-string-short.js n=1000000 len=8 encoding='utf8'                                                                                           -0.04 %       ±3.06%  ±4.07%  ±5.30%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding=''                                                                                   **      0.53 %       ±0.33%  ±0.44%  ±0.58%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='ascii'                                                                             ***      1.67 %       ±0.88%  ±1.17%  ±1.52%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='hex'                                                                               ***     -1.58 %       ±0.44%  ±0.59%  ±0.77%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='latin1'                                                                            ***     -4.73 %       ±1.09%  ±1.45%  ±1.89%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='utf16le'                                                                           ***     -4.10 %       ±1.18%  ±1.58%  ±2.05%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='utf8'                                                                              ***      1.13 %       ±0.44%  ±0.59%  ±0.78%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding=''                                                                            ***     -2.55 %       ±1.14%  ±1.51%  ±1.97%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='ascii'                                                                         *     -4.11 %       ±3.57%  ±4.76%  ±6.19%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='hex'                                                                         ***     -1.69 %       ±0.45%  ±0.60%  ±0.78%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='latin1'                                                                              -3.33 %       ±3.69%  ±4.91%  ±6.39%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='utf16le'                                                                             -0.87 %       ±2.29%  ±3.04%  ±3.96%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='utf8'                                                                        ***     -2.69 %       ±1.45%  ±1.92%  ±2.51%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding=''                                                                             -0.40 %       ±0.77%  ±1.02%  ±1.33%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='ascii'                                                                         0.24 %       ±3.52%  ±4.69%  ±6.10%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='hex'                                                                  ***     -1.90 %       ±0.38%  ±0.50%  ±0.65%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='latin1'                                                               ***      9.16 %       ±3.22%  ±4.29%  ±5.61%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='utf16le'                                                              ***     -5.70 %       ±1.51%  ±2.00%  ±2.61%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='utf8'                                                                         -0.13 %       ±0.89%  ±1.18%  ±1.54%
buffers/buffer-write.js n=1000000 type='BigInt64BE' buffer='fast'                                                                                              -0.11 %       ±1.82%  ±2.43%  ±3.17%
buffers/buffer-write.js n=1000000 type='BigInt64LE' buffer='fast'                                                                                               0.13 %       ±1.72%  ±2.29%  ±2.98%
buffers/buffer-write.js n=1000000 type='BigUInt64BE' buffer='fast'                                                                                              0.95 %       ±1.95%  ±2.59%  ±3.37%
buffers/buffer-write.js n=1000000 type='BigUInt64LE' buffer='fast'                                                                                              1.50 %       ±1.64%  ±2.19%  ±2.86%
buffers/buffer-write.js n=1000000 type='DoubleBE' buffer='fast'                                                                                                 9.24 %      ±14.21% ±18.91% ±24.62%
buffers/buffer-write.js n=1000000 type='DoubleLE' buffer='fast'                                                                                                 8.23 %      ±12.94% ±17.22% ±22.42%
buffers/buffer-write.js n=1000000 type='FloatBE' buffer='fast'                                                                                                  8.85 %      ±16.66% ±22.16% ±28.84%
buffers/buffer-write.js n=1000000 type='FloatLE' buffer='fast'                                                                                                  8.96 %      ±16.84% ±22.40% ±29.16%
buffers/buffer-write.js n=1000000 type='Int16BE' buffer='fast'                                                                                           *     14.73 %      ±14.22% ±18.93% ±24.66%
buffers/buffer-write.js n=1000000 type='Int16LE' buffer='fast'                                                                                                  1.52 %      ±14.55% ±19.36% ±25.20%
buffers/buffer-write.js n=1000000 type='Int32BE' buffer='fast'                                                                                                 -0.45 %      ±18.15% ±24.15% ±31.43%
buffers/buffer-write.js n=1000000 type='Int32LE' buffer='fast'                                                                                                 19.00 %      ±19.57% ±26.05% ±33.92%
buffers/buffer-write.js n=1000000 type='Int8' buffer='fast'                                                                                                    -1.93 %      ±11.20% ±14.91% ±19.40%
buffers/buffer-write.js n=1000000 type='IntBE' buffer='fast'                                                                                                   -1.45 %       ±9.26% ±12.32% ±16.03%
buffers/buffer-write.js n=1000000 type='IntLE' buffer='fast'                                                                                                    2.83 %       ±9.99% ±13.29% ±17.29%
buffers/buffer-write.js n=1000000 type='UInt16BE' buffer='fast'                                                                                                 4.59 %      ±14.43% ±19.20% ±24.99%
buffers/buffer-write.js n=1000000 type='UInt16LE' buffer='fast'                                                                                                 1.48 %      ±15.05% ±20.02% ±26.06%
buffers/buffer-write.js n=1000000 type='UInt32BE' buffer='fast'                                                                                                 9.99 %      ±12.15% ±16.16% ±21.04%
buffers/buffer-write.js n=1000000 type='UInt32LE' buffer='fast'                                                                                                 8.12 %       ±9.90% ±13.17% ±17.15%
buffers/buffer-write.js n=1000000 type='UInt8' buffer='fast'                                                                                                    7.36 %      ±14.25% ±18.96% ±24.67%
buffers/buffer-write.js n=1000000 type='UIntBE' buffer='fast'                                                                                            *     15.99 %      ±13.91% ±18.52% ±24.10%
buffers/buffer-write.js n=1000000 type='UIntLE' buffer='fast'                                                                                                   6.98 %      ±12.11% ±16.11% ±20.97%
buffers/buffer-zero.js type='buffer' n=1000000                                                                                                                  1.10 %       ±2.42%  ±3.22%  ±4.19%
buffers/buffer-zero.js type='string' n=1000000                                                                                                                 -0.29 %       ±3.74%  ±4.98%  ±6.48%
buffers/dataview-set.js n=1000000 type='Float32BE'                                                                                                             -0.28 %       ±3.50%  ±4.66%  ±6.06%
buffers/dataview-set.js n=1000000 type='Float32LE'                                                                                                              1.52 %       ±5.04%  ±6.70%  ±8.72%
buffers/dataview-set.js n=1000000 type='Float64BE'                                                                                                             -3.56 %       ±4.50%  ±5.98%  ±7.80%
buffers/dataview-set.js n=1000000 type='Float64LE'                                                                                                              5.29 %       ±5.32%  ±7.12%  ±9.34%
buffers/dataview-set.js n=1000000 type='Int16BE'                                                                                                                2.74 %       ±3.40%  ±4.53%  ±5.91%
buffers/dataview-set.js n=1000000 type='Int16LE'                                                                                                                0.41 %       ±2.80%  ±3.73%  ±4.85%
buffers/dataview-set.js n=1000000 type='Int32BE'                                                                                                               -0.45 %       ±2.84%  ±3.78%  ±4.93%
buffers/dataview-set.js n=1000000 type='Int32LE'                                                                                                               -1.51 %       ±4.28%  ±5.71%  ±7.46%
buffers/dataview-set.js n=1000000 type='Int8'                                                                                                                  -0.10 %       ±1.54%  ±2.05%  ±2.67%
buffers/dataview-set.js n=1000000 type='Uint16BE'                                                                                                       **      5.13 %       ±3.77%  ±5.02%  ±6.54%
buffers/dataview-set.js n=1000000 type='Uint16LE'                                                                                                              -2.20 %       ±3.56%  ±4.73%  ±6.16%
buffers/dataview-set.js n=1000000 type='Uint32BE'                                                                                                              -1.12 %       ±2.76%  ±3.68%  ±4.79%
buffers/dataview-set.js n=1000000 type='Uint32LE'                                                                                                              -0.90 %       ±2.43%  ±3.24%  ±4.21%
buffers/dataview-set.js n=1000000 type='Uint8'                                                                                                                  0.37 %       ±1.10%  ±1.46%  ±1.90%

``

return this;
}
return _swap16(this);
_swap16(this);
Copy link
Member

@ChALkeR ChALkeR Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would happen if it's called on not a TypeArrayView now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. Buffer.prototype.swap16.apply(new Array(128))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I will add a JS side guard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would that be good approach @ChALkeR ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It changes the method to not being callable on a typedarray that is not an uint8array, but the previous behavior was inconsistent in that case anyway as the js part swapped elements and the src part swapped bytes

So I think explicitly blocking non-uint8arr should be fine and not a semver-major?
(perhaps cc @nodejs/lts just in case)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently node -e 'Buffer.prototype.swap16.apply(new Float32Array(128))' does not throw. If we add a check for Uint8Array, that's a potential breaking change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aduh95 actually the point is it should always be thrown error on TypedArray because the current behavior silently corrupts data on the C++ path and on the JS loop path it swaps float elements instead of bytes. So a clean error is strictly better than silent data corruption. this is what @ChALkeR pointed

const f = new Float32Array(128);
f[0] = 1.5;                          // bytes: 00 00 C0 3F
Buffer.prototype.swap16.call(f);
console.log(f[0]);                    // -2.984375 (bytes: 00 00 3F C0)

@RafaelGSS RafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 11, 2026
@github-actions github-actions bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Mar 11, 2026
@github-actions
Copy link
Contributor

Failed to start CI
   ⚠  Commits were pushed since the last approving review:
   ⚠  - buffer: improve performance of multiple Buffer operations
   ⚠  - buffer: address PR feedback
   ⚠  - buffer: revert toHex in favour of nbytes HexEncode update
   ⚠  - resolve feedback
   ⚠  - resolve feedback on fast callbacks
   ⚠  - added comments and updated tests
   ⚠  - resolve feedback
   ✘  Refusing to run CI on potentially unsafe PR
https://github.com/nodejs/node/actions/runs/22977319444

Comment on lines +385 to 390
const byteLength = TypedArrayPrototypeGetByteLength(view);

if (offset !== undefined || length !== undefined) {
if (offset !== undefined) {
validateInteger(offset, 'offset', 0);
if (offset >= viewLength) return new FastBuffer();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case we return here, we have called TypedArrayPrototypeGetByteLength for nothing. Can we move it further down?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, let me flatten the structure currently it's quite nested to accomedate this


function fromArrayLike(obj) {
if (obj.length <= 0)
const len = obj.length;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
const len = obj.length;
const { length } = obj;

// do the swap in javascript. For larger buffers,
// dropping down to the native code is faster.
if (!isUint8Array(this))
throw new ERR_INVALID_ARG_TYPE('this', ['Buffer', 'Uint8Array'], this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new ERR_INVALID_ARG_TYPE('this', ['Buffer', 'Uint8Array'], this);
throw new ERR_INVALID_THIS('Uint8Array');

Copy link
Contributor Author

@thisalihassan thisalihassan Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aduh95 I believe ERR_INVALID_ARG_TYPE gives better error message, but if you think ERR_INVALID_THIS follows the spec better happy to align with the change

=== swap16 (ERR_INVALID_ARG_TYPE) ===
code: ERR_INVALID_ARG_TYPE
message: The "this" argument must be an instance of Buffer or Uint8Array. Received an instance of Float32Array

=== swap32 (ERR_INVALID_THIS) ===
code: ERR_INVALID_THIS
message: Value of "this" must be of type Uint8Array

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overriding the this value is not really supported on Node.js APIs, so we don't really care about the error message. ERR_INVALID_ARG_TYPE is not suited, as this is not an argument. My preference would be to go with #61871 (comment), if not to use ERR_INVALID_THIS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh then I think TypedArrayPrototypeGetLength might be a bit confusing as it doesn't block Float32Array
Buffer.prototype.swap32.call(new Float32Array(4));

it's a TypedArray check, not a Uint8Array check

what do you think @aduh95? check #61861_comment_by_ChaLker

// do the swap in javascript. For larger buffers,
// dropping down to the native code is faster.
if (!isUint8Array(this))
throw new ERR_INVALID_ARG_TYPE('this', ['Buffer', 'Uint8Array'], this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new ERR_INVALID_ARG_TYPE('this', ['Buffer', 'Uint8Array'], this);
throw new ERR_INVALID_THIS('Uint8Array');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Comment on lines +1273 to 1275
if (!isUint8Array(this))
throw new ERR_INVALID_ARG_TYPE('this', ['Buffer', 'Uint8Array'], this);
const len = this.length;
Copy link
Contributor

@aduh95 aduh95 Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we can use the primordials to get the brand check for free

Suggested change
if (!isUint8Array(this))
throw new ERR_INVALID_ARG_TYPE('this', ['Buffer', 'Uint8Array'], this);
const len = this.length;
const len = TypedArrayPrototypeGetLength(this);

Or do we want TypedArrayPrototypeGetByteLength here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we can use the primordials to get the brand check for free

This would result in an unhelpful error.

TypeError: Method get TypedArray.prototype.length called on incompatible receiver

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is that unhelpful? The full error message would be TypeError: Method get TypedArray.prototype.length called on incompatible receiver [object Array] btw

Copy link
Contributor Author

@thisalihassan thisalihassan Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup here's all three error messages:

=== swap16 (ERR_INVALID_ARG_TYPE) ===
code: ERR_INVALID_ARG_TYPE
message: The "this" argument must be an instance of Buffer or Uint8Array. Received an instance of Float32Array

=== swap32 (ERR_INVALID_THIS) ===
code: ERR_INVALID_THIS
message: Value of "this" must be of type Uint8Array

=== swap64 ===
code: undefined
message: Method get TypedArray.prototype.length called on incompatible receiver [object Array]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js. request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants