Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: improve Buffer.equals performance #50621

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

kylo5aby
Copy link
Contributor

@kylo5aby kylo5aby commented Nov 8, 2023

improve Buffer.equals performance:

                                                              confidence improvement accuracy (*)   (**)  (***)
buffers/buffer-equals.js n=1000000 difflen='false' size=0            ***    147.60 %       ±1.94% ±2.58% ±3.37%
buffers/buffer-equals.js n=1000000 difflen='false' size=16386        ***      5.47 %       ±2.92% ±3.93% ±5.22%
buffers/buffer-equals.js n=1000000 difflen='false' size=512          ***     34.73 %       ±0.85% ±1.13% ±1.48%
buffers/buffer-equals.js n=1000000 difflen='true' size=0             ***     82.37 %       ±3.70% ±4.98% ±6.60%
buffers/buffer-equals.js n=1000000 difflen='true' size=16386         ***     85.01 %       ±1.84% ±2.45% ±3.19%
buffers/buffer-equals.js n=1000000 difflen='true' size=512           ***     82.84 %       ±3.14% ±4.20% ±5.53%

As mentioned in #50620 , the performance regression of Buffer.byteLength might be due
to ArrayBufferView.byteLength, reduce the property access of Buffer.byteLength
helps to reduce regression for Buffer.equals

Inspired by the comment from @aduh95, using TypedArrayPrototypeGetByteLength
also improves performance.

Refs: #50620

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. needs-ci PRs that need a full CI run. labels Nov 8, 2023
@RaisinTen RaisinTen added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 8, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 8, 2023
@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the needs-benchmark-ci PR that need a benchmark CI run. label Nov 8, 2023
lib/buffer.js Outdated
@@ -860,11 +860,11 @@ Buffer.prototype.equals = function equals(otherBuffer) {

if (this === otherBuffer)
return true;

if (this.byteLength !== otherBuffer.byteLength)
const len = this.byteLength;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you try with TypedArrayPrototypeGetByteLength from primordials? I'd be curious to see if that would improve perf further or not.

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 suggestion. I have tried TypedArrayPrototypeGetByteLength. As you can see in the updated benchmark result, it improved a lot.

lib/buffer.js Show resolved Hide resolved
@aduh95
Copy link
Contributor

aduh95 commented Nov 8, 2023

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

Results
confidence improvement accuracy (*)    (**)   (***)
buffers/buffer-base64-decode-wrapped.js n=32 linesCount=524288 charsPerLine=76                                                                                 -0.20 %       ±0.58%  ±0.78%  ±1.01%
buffers/buffer-base64-decode.js size=8388608 n=32                                                                                                               0.07 %       ±0.86%  ±1.14%  ±1.49%
buffers/buffer-base64-encode.js n=32 len=67108864                                                                                                               0.37 %       ±1.20%  ±1.60%  ±2.08%
buffers/buffer-base64url-decode.js size=8388608 n=32                                                                                                            0.38 %       ±0.70%  ±0.93%  ±1.21%
buffers/buffer-base64url-encode.js n=32 len=67108864                                                                                                           -0.01 %       ±0.37%  ±0.49%  ±0.63%
buffers/buffer-bytelength-buffer.js n=4000000 len=16                                                                                                           -2.14 %      ±10.08% ±13.41% ±17.45%
buffers/buffer-bytelength-buffer.js n=4000000 len=2                                                                                                            -4.59 %       ±9.36% ±12.46% ±16.23%
buffers/buffer-bytelength-buffer.js n=4000000 len=256                                                                                                           0.17 %       ±9.88% ±13.15% ±17.12%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='four_bytes'                                                                     -1.73 %       ±4.99%  ±6.64%  ±8.64%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='one_byte'                                                                       -2.10 %       ±5.60%  ±7.45%  ±9.70%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='three_bytes'                                                             **     -7.48 %       ±4.93%  ±6.56%  ±8.54%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='base64' type='two_bytes'                                                                       1.35 %       ±5.68%  ±7.55%  ±9.84%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='four_bytes'                                                                        0.62 %       ±3.03%  ±4.04%  ±5.25%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='one_byte'                                                                         -0.62 %       ±6.98%  ±9.28% ±12.08%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='three_bytes'                                                                       2.69 %       ±3.22%  ±4.29%  ±5.58%
buffers/buffer-bytelength-string.js n=4000000 repeat=1 encoding='utf8' type='two_bytes'                                                                        -1.67 %       ±3.71%  ±4.93%  ±6.42%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='four_bytes'                                                                    -1.96 %       ±5.86%  ±7.80% ±10.15%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='one_byte'                                                                      -3.82 %       ±5.47%  ±7.29%  ±9.51%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='three_bytes'                                                             *      7.19 %       ±5.95%  ±7.91% ±10.30%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='base64' type='two_bytes'                                                                     -2.75 %       ±5.12%  ±6.82%  ±8.88%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='four_bytes'                                                                       0.20 %       ±0.45%  ±0.60%  ±0.78%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='one_byte'                                                                        -1.87 %       ±3.41%  ±4.53%  ±5.90%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='three_bytes'                                                                      0.07 %       ±1.03%  ±1.38%  ±1.79%
buffers/buffer-bytelength-string.js n=4000000 repeat=16 encoding='utf8' type='two_bytes'                                                                       -0.52 %       ±1.06%  ±1.41%  ±1.84%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='four_bytes'                                                               *     -6.65 %       ±5.36%  ±7.13%  ±9.29%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='one_byte'                                                                       -0.80 %       ±5.44%  ±7.23%  ±9.42%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='three_bytes'                                                                     1.69 %       ±5.29%  ±7.04%  ±9.16%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='base64' type='two_bytes'                                                                      -5.04 %       ±5.74%  ±7.63%  ±9.94%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='four_bytes'                                                                        0.45 %       ±1.72%  ±2.29%  ±2.99%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='one_byte'                                                                         -0.14 %       ±5.19%  ±6.90%  ±8.99%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='three_bytes'                                                                       0.22 %       ±2.17%  ±2.89%  ±3.76%
buffers/buffer-bytelength-string.js n=4000000 repeat=2 encoding='utf8' type='two_bytes'                                                                        -1.43 %       ±2.36%  ±3.14%  ±4.08%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='four_bytes'                                                                   -0.94 %       ±4.90%  ±6.52%  ±8.48%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='one_byte'                                                                     -1.18 %       ±5.77%  ±7.67%  ±9.99%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='three_bytes'                                                            *      6.35 %       ±5.43%  ±7.23%  ±9.42%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='base64' type='two_bytes'                                                                    -3.87 %       ±5.42%  ±7.22%  ±9.42%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='four_bytes'                                                                     -0.00 %       ±0.06%  ±0.07%  ±0.10%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='one_byte'                                                                       -0.20 %       ±0.58%  ±0.77%  ±1.00%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='three_bytes'                                                                    -0.05 %       ±0.11%  ±0.14%  ±0.18%
buffers/buffer-bytelength-string.js n=4000000 repeat=256 encoding='utf8' type='two_bytes'                                                                       0.04 %       ±0.11%  ±0.14%  ±0.19%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=16                                                                                             -2.09 %       ±9.56% ±12.72% ±16.55%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=16386                                                                                    *      2.93 %       ±2.81%  ±3.75%  ±4.90%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=4096                                                                                            3.38 %       ±7.61% ±10.13% ±13.19%
buffers/buffer-compare-instance-method.js n=1000000 args=1 size=512                                                                                      *    -12.01 %       ±9.62% ±12.80% ±16.67%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=16                                                                                              1.50 %       ±7.88% ±10.49% ±13.67%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=16386                                                                                           2.31 %       ±2.67%  ±3.55%  ±4.62%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=4096                                                                                     *     -6.47 %       ±6.43%  ±8.56% ±11.14%
buffers/buffer-compare-instance-method.js n=1000000 args=2 size=512                                                                                             9.74 %      ±10.71% ±14.25% ±18.55%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=16                                                                                              2.73 %      ±10.48% ±13.95% ±18.17%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=16386                                                                                    *      2.75 %       ±2.10%  ±2.79%  ±3.63%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=4096                                                                                            2.58 %       ±6.00%  ±7.98% ±10.39%
buffers/buffer-compare-instance-method.js n=1000000 args=5 size=512                                                                                            -0.53 %       ±8.88% ±11.82% ±15.38%
buffers/buffer-compare-offset.js n=1000000 size=16 method='offset'                                                                                              6.77 %      ±10.51% ±13.98% ±18.20%
buffers/buffer-compare-offset.js n=1000000 size=16 method='slice'                                                                                               0.98 %       ±4.27%  ±5.68%  ±7.40%
buffers/buffer-compare-offset.js n=1000000 size=16386 method='offset'                                                                                           1.28 %       ±9.47% ±12.60% ±16.40%
buffers/buffer-compare-offset.js n=1000000 size=16386 method='slice'                                                                                            0.51 %       ±3.64%  ±4.84%  ±6.30%
buffers/buffer-compare-offset.js n=1000000 size=4096 method='offset'                                                                                           -4.31 %       ±9.12% ±12.14% ±15.80%
buffers/buffer-compare-offset.js n=1000000 size=4096 method='slice'                                                                                            -0.91 %       ±3.26%  ±4.33%  ±5.64%
buffers/buffer-compare-offset.js n=1000000 size=512 method='offset'                                                                                            -2.52 %       ±9.88% ±13.15% ±17.12%
buffers/buffer-compare-offset.js n=1000000 size=512 method='slice'                                                                                              0.81 %       ±3.75%  ±5.00%  ±6.50%
buffers/buffer-compare.js n=1000000 size=16                                                                                                                     4.40 %       ±8.57% ±11.42% ±14.90%
buffers/buffer-compare.js n=1000000 size=16386                                                                                                           *      3.28 %       ±2.65%  ±3.53%  ±4.59%
buffers/buffer-compare.js n=1000000 size=4096                                                                                                                  -3.33 %       ±8.51% ±11.32% ±14.73%
buffers/buffer-compare.js n=1000000 size=512                                                                                                                   -3.93 %      ±10.07% ±13.40% ±17.45%
buffers/buffer-concat-fill.js n=800000 extraSize=1                                                                                                             -1.83 %       ±5.37%  ±7.15%  ±9.30%
buffers/buffer-concat-fill.js n=800000 extraSize=1024                                                                                                          -0.60 %       ±2.30%  ±3.07%  ±4.01%
buffers/buffer-concat-fill.js n=800000 extraSize=256                                                                                                           -0.08 %       ±3.58%  ±4.76%  ±6.21%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=1 pieces=16                                                                                       0.95 %       ±3.86%  ±5.14%  ±6.69%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=1 pieces=4                                                                                       -0.94 %       ±8.76% ±11.66% ±15.17%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=16 pieces=16                                                                                      0.52 %       ±3.11%  ±4.13%  ±5.38%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=16 pieces=4                                                                                      -1.57 %       ±7.98% ±10.63% ±13.84%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=256 pieces=16                                                                                    -0.17 %       ±1.25%  ±1.66%  ±2.16%
buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=256 pieces=4                                                                                      1.53 %       ±3.30%  ±4.39%  ±5.72%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=1 pieces=16                                                                                       2.03 %       ±2.98%  ±3.97%  ±5.17%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=1 pieces=4                                                                                       -1.02 %       ±8.85% ±11.77% ±15.33%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=16 pieces=16                                                                               *      4.52 %       ±3.85%  ±5.12%  ±6.66%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=16 pieces=4                                                                                       0.15 %       ±7.87% ±10.47% ±13.63%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=256 pieces=16                                                                                    -0.95 %       ±1.20%  ±1.60%  ±2.09%
buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=256 pieces=4                                                                                     -1.15 %       ±3.11%  ±4.14%  ±5.39%
buffers/buffer-copy.js n=6000000 partial='false' bytes=0                                                                                                       -1.95 %       ±9.07% ±12.07% ±15.71%
buffers/buffer-copy.js n=6000000 partial='true' bytes=128                                                                                                       0.53 %       ±1.78%  ±2.37%  ±3.08%
buffers/buffer-copy.js n=6000000 partial='true' bytes=32768                                                                                                    -1.62 %       ±3.18%  ±4.23%  ±5.50%
buffers/buffer-copy.js n=6000000 partial='true' bytes=8                                                                                                         0.05 %       ±2.02%  ±2.69%  ±3.50%
buffers/buffer-creation.js n=600000 len=10 type='fast-alloc-fill'                                                                                              -4.61 %       ±9.74% ±12.97% ±16.88%
buffers/buffer-creation.js n=600000 len=10 type='fast-alloc'                                                                                                   -2.35 %       ±6.29%  ±8.37% ±10.92%
buffers/buffer-creation.js n=600000 len=10 type='fast-allocUnsafe'                                                                                              3.85 %       ±6.95%  ±9.25% ±12.04%
buffers/buffer-creation.js n=600000 len=10 type='slow-allocUnsafe'                                                                                              7.14 %      ±10.02% ±13.34% ±17.36%
buffers/buffer-creation.js n=600000 len=1024 type='fast-alloc-fill'                                                                                            -0.62 %       ±1.41%  ±1.88%  ±2.45%
buffers/buffer-creation.js n=600000 len=1024 type='fast-alloc'                                                                                                 -1.10 %       ±1.93%  ±2.57%  ±3.35%
buffers/buffer-creation.js n=600000 len=1024 type='fast-allocUnsafe'                                                                                            1.84 %       ±5.43%  ±7.23%  ±9.41%
buffers/buffer-creation.js n=600000 len=1024 type='slow-allocUnsafe'                                                                                            1.35 %       ±2.04%  ±2.71%  ±3.53%
buffers/buffer-creation.js n=600000 len=4096 type='fast-alloc-fill'                                                                                             0.04 %       ±1.63%  ±2.17%  ±2.83%
buffers/buffer-creation.js n=600000 len=4096 type='fast-alloc'                                                                                                  0.51 %       ±1.36%  ±1.80%  ±2.35%
buffers/buffer-creation.js n=600000 len=4096 type='fast-allocUnsafe'                                                                                            0.33 %       ±2.17%  ±2.89%  ±3.76%
buffers/buffer-creation.js n=600000 len=4096 type='slow-allocUnsafe'                                                                                            0.20 %       ±1.60%  ±2.13%  ±2.77%
buffers/buffer-creation.js n=600000 len=8192 type='fast-alloc-fill'                                                                                            -0.38 %       ±1.77%  ±2.36%  ±3.07%
buffers/buffer-creation.js n=600000 len=8192 type='fast-alloc'                                                                                                  0.74 %       ±1.37%  ±1.82%  ±2.37%
buffers/buffer-creation.js n=600000 len=8192 type='fast-allocUnsafe'                                                                                     *     -1.47 %       ±1.36%  ±1.82%  ±2.38%
buffers/buffer-creation.js n=600000 len=8192 type='slow-allocUnsafe'                                                                                            0.70 %       ±1.85%  ±2.46%  ±3.20%
buffers/buffer-equals.js n=1000000 difflen='false' size=0                                                                                              ***    128.08 %      ±13.06% ±17.43% ±22.77%
buffers/buffer-equals.js n=1000000 difflen='false' size=16386                                                                                          ***     -9.56 %       ±3.14%  ±4.18%  ±5.44%
buffers/buffer-equals.js n=1000000 difflen='false' size=512                                                                                            ***     39.88 %      ±11.28% ±15.08% ±19.79%
buffers/buffer-equals.js n=1000000 difflen='true' size=0                                                                                               ***     72.04 %       ±9.32% ±12.41% ±16.16%
buffers/buffer-equals.js n=1000000 difflen='true' size=16386                                                                                           ***     60.21 %      ±12.47% ±16.61% ±21.66%
buffers/buffer-equals.js n=1000000 difflen='true' size=512                                                                                             ***     66.80 %       ±9.09% ±12.09% ±15.74%
buffers/buffer-fill.js n=20000 size=65536 type='fill("")'                                                                                                *     -2.32 %       ±2.14%  ±2.85%  ±3.72%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", "utf8")'                                                                                              1.43 %       ±3.60%  ±4.79%  ±6.24%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", 0, "utf8")'                                                                                           0.12 %       ±3.32%  ±4.41%  ±5.74%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t", 0)'                                                                                                   0.77 %       ±3.57%  ±4.74%  ±6.18%
buffers/buffer-fill.js n=20000 size=65536 type='fill("t")'                                                                                                     -2.50 %       ±3.82%  ±5.08%  ±6.63%
buffers/buffer-fill.js n=20000 size=65536 type='fill("test")'                                                                                                  -2.28 %       ±5.47%  ±7.28%  ±9.50%
buffers/buffer-fill.js n=20000 size=65536 type='fill(0)'                                                                                                        1.69 %       ±1.82%  ±2.43%  ±3.16%
buffers/buffer-fill.js n=20000 size=65536 type='fill(100)'                                                                                                     -2.03 %       ±3.97%  ±5.32%  ±7.00%
buffers/buffer-fill.js n=20000 size=65536 type='fill(400)'                                                                                                      1.09 %       ±4.85%  ±6.46%  ±8.43%
buffers/buffer-fill.js n=20000 size=65536 type='fill(Buffer.alloc(1), 0)'                                                                                      -0.03 %       ±4.10%  ±5.45%  ±7.10%
buffers/buffer-fill.js n=20000 size=8192 type='fill("")'                                                                                               ***     11.83 %       ±4.89%  ±6.50%  ±8.46%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", "utf8")'                                                                                               2.40 %       ±4.64%  ±6.17%  ±8.03%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", 0, "utf8")'                                                                                    **      8.13 %       ±5.01%  ±6.69%  ±8.76%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t", 0)'                                                                                           ***     11.58 %       ±5.45%  ±7.25%  ±9.44%
buffers/buffer-fill.js n=20000 size=8192 type='fill("t")'                                                                                              ***     10.82 %       ±5.06%  ±6.73%  ±8.76%
buffers/buffer-fill.js n=20000 size=8192 type='fill("test")'                                                                                                    3.84 %       ±6.36%  ±8.47% ±11.04%
buffers/buffer-fill.js n=20000 size=8192 type='fill(0)'                                                                                                ***     23.21 %       ±7.64% ±10.18% ±13.29%
buffers/buffer-fill.js n=20000 size=8192 type='fill(100)'                                                                                              ***     14.54 %       ±6.86%  ±9.15% ±11.95%
buffers/buffer-fill.js n=20000 size=8192 type='fill(400)'                                                                                              ***     19.85 %       ±7.32%  ±9.74% ±12.69%
buffers/buffer-fill.js n=20000 size=8192 type='fill(Buffer.alloc(1), 0)'                                                                                        3.14 %       ±4.19%  ±5.58%  ±7.26%
buffers/buffer-from.js n=800000 len=100 source='array'                                                                                                          0.24 %       ±7.16%  ±9.54% ±12.42%
buffers/buffer-from.js n=800000 len=100 source='arraybuffer-middle'                                                                                             2.53 %      ±11.05% ±14.70% ±19.13%
buffers/buffer-from.js n=800000 len=100 source='arraybuffer'                                                                                                   -6.11 %       ±9.11% ±12.13% ±15.80%
buffers/buffer-from.js n=800000 len=100 source='buffer'                                                                                                        -5.49 %       ±8.40% ±11.18% ±14.55%
buffers/buffer-from.js n=800000 len=100 source='object'                                                                                                        -1.04 %       ±9.86% ±13.12% ±17.07%
buffers/buffer-from.js n=800000 len=100 source='string-base64'                                                                                                  2.38 %       ±3.94%  ±5.24%  ±6.83%
buffers/buffer-from.js n=800000 len=100 source='string-utf8'                                                                                                    0.46 %       ±5.81%  ±7.73% ±10.06%
buffers/buffer-from.js n=800000 len=100 source='string'                                                                                                         2.26 %       ±5.50%  ±7.33%  ±9.54%
buffers/buffer-from.js n=800000 len=100 source='uint16array'                                                                                                    3.81 %       ±7.14%  ±9.51% ±12.37%
buffers/buffer-from.js n=800000 len=100 source='uint8array'                                                                                                    -1.99 %       ±8.41% ±11.19% ±14.56%
buffers/buffer-from.js n=800000 len=2048 source='array'                                                                                                  *      1.49 %       ±1.25%  ±1.67%  ±2.18%
buffers/buffer-from.js n=800000 len=2048 source='arraybuffer-middle'                                                                                           -7.81 %       ±9.98% ±13.29% ±17.30%
buffers/buffer-from.js n=800000 len=2048 source='arraybuffer'                                                                                                  -8.89 %      ±10.24% ±13.62% ±17.73%
buffers/buffer-from.js n=800000 len=2048 source='buffer'                                                                                                        0.90 %       ±1.69%  ±2.26%  ±2.94%
buffers/buffer-from.js n=800000 len=2048 source='object'                                                                                                       -1.47 %      ±10.25% ±13.64% ±17.75%
buffers/buffer-from.js n=800000 len=2048 source='string-base64'                                                                                                 0.82 %       ±1.52%  ±2.03%  ±2.65%
buffers/buffer-from.js n=800000 len=2048 source='string-utf8'                                                                                                   0.41 %       ±1.76%  ±2.35%  ±3.05%
buffers/buffer-from.js n=800000 len=2048 source='string'                                                                                                       -0.52 %       ±1.54%  ±2.06%  ±2.68%
buffers/buffer-from.js n=800000 len=2048 source='uint16array'                                                                                                  -0.17 %       ±2.53%  ±3.37%  ±4.38%
buffers/buffer-from.js n=800000 len=2048 source='uint8array'                                                                                                    0.93 %       ±2.12%  ±2.82%  ±3.68%
buffers/buffer-hex-decode.js n=1000000 len=1024                                                                                                                 0.19 %       ±0.64%  ±0.85%  ±1.11%
buffers/buffer-hex-decode.js n=1000000 len=64                                                                                                                   2.28 %       ±3.85%  ±5.12%  ±6.67%
buffers/buffer-hex-encode.js n=1000000 len=1024                                                                                                                -0.60 %       ±1.57%  ±2.09%  ±2.73%
buffers/buffer-hex-encode.js n=1000000 len=64                                                                                                                   0.96 %       ±5.38%  ±7.16%  ±9.32%
buffers/buffer-indexof-number.js n=1000000 value=64                                                                                                            -6.43 %       ±7.77% ±10.38% ±13.58%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='--l'                                                                              -3.92 %       ±5.14%  ±6.85%  ±8.91%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='@'                                                                                -0.24 %       ±5.29%  ±7.04%  ±9.17%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='</i> to the Caterpillar'                                                          -0.20 %       ±1.28%  ±1.71%  ±2.22%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='aaaaaaaaaaaaaaaaa'                                                                -0.30 %       ±1.73%  ±2.31%  ±3.00%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='Alice'                                                                             1.66 %       ±7.47%  ±9.94% ±12.94%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='found it very'                                                                     0.45 %       ±0.72%  ±0.96%  ±1.25%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='Gryphon'                                                                          -4.42 %       ±9.68% ±12.88% ±16.76%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='neighbouring pool'                                                                -0.18 %       ±0.92%  ±1.23%  ±1.60%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='Ou est ma chatte?'                                                                -0.39 %       ±2.40%  ±3.19%  ±4.16%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='SQ'                                                                               -0.78 %       ±7.75% ±10.31% ±13.42%
buffers/buffer-indexof.js n=50000 type='buffer' encoding='undefined' search='venture to go near the house till she had brought herself down to'                -1.49 %       ±2.04%  ±2.72%  ±3.54%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='--l'                                                                                   -0.13 %       ±3.60%  ±4.78%  ±6.23%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='@'                                                                                      1.03 %       ±6.15%  ±8.19% ±10.66%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='</i> to the Caterpillar'                                                               -0.39 %       ±1.26%  ±1.68%  ±2.19%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='aaaaaaaaaaaaaaaaa'                                                                      0.04 %       ±2.40%  ±3.20%  ±4.17%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='Alice'                                                                                  4.59 %       ±9.37% ±12.47% ±16.23%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='found it very'                                                                         -0.69 %       ±0.94%  ±1.26%  ±1.64%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='Gryphon'                                                                               -2.00 %       ±4.39%  ±5.85%  ±7.62%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='neighbouring pool'                                                                      0.46 %       ±1.26%  ±1.68%  ±2.19%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='Ou est ma chatte?'                                                                      1.04 %       ±2.55%  ±3.39%  ±4.41%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='SQ'                                                                                     0.31 %       ±8.01% ±10.66% ±13.88%
buffers/buffer-indexof.js n=50000 type='string' encoding='ucs2' search='venture to go near the house till she had brought herself down to'                      0.14 %       ±1.60%  ±2.13%  ±2.77%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='--l'                                                                                    2.00 %       ±5.38%  ±7.16%  ±9.32%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='@'                                                                               *      6.42 %       ±5.26%  ±7.03%  ±9.21%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='</i> to the Caterpillar'                                                                0.06 %       ±1.30%  ±1.73%  ±2.25%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='aaaaaaaaaaaaaaaaa'                                                                      0.24 %       ±1.92%  ±2.56%  ±3.33%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='Alice'                                                                                  1.06 %       ±9.37% ±12.46% ±16.22%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='found it very'                                                                         -0.35 %       ±0.80%  ±1.06%  ±1.38%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='Gryphon'                                                                                2.08 %       ±8.32% ±11.07% ±14.41%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='neighbouring pool'                                                                     -0.46 %       ±0.85%  ±1.12%  ±1.46%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='Ou est ma chatte?'                                                                     -1.20 %       ±1.64%  ±2.19%  ±2.84%
buffers/buffer-indexof.js n=50000 type='string' encoding='utf8' search='SQ'                                                                                    -4.29 %       ±7.96% ±10.61% ±13.84%
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.84 %       ±1.76%  ±2.35%  ±3.06%
buffers/buffer-iterate.js n=1000 method='for' type='fast' size=16386                                                                                    **     -9.23 %       ±6.05%  ±8.16% ±10.83%
buffers/buffer-iterate.js n=1000 method='for' type='fast' size=4096                                                                                            -3.64 %       ±4.18%  ±5.58%  ±7.27%
buffers/buffer-iterate.js n=1000 method='for' type='fast' size=512                                                                                              1.20 %       ±2.88%  ±3.84%  ±5.00%
buffers/buffer-iterate.js n=1000 method='forOf' type='fast' size=16386                                                                                          0.78 %       ±7.36%  ±9.79% ±12.74%
buffers/buffer-iterate.js n=1000 method='forOf' type='fast' size=4096                                                                                           0.94 %       ±2.54%  ±3.42%  ±4.53%
buffers/buffer-iterate.js n=1000 method='forOf' type='fast' size=512                                                                                           -0.93 %       ±2.19%  ±2.92%  ±3.80%
buffers/buffer-iterate.js n=1000 method='iterator' type='fast' size=16386                                                                                      -4.94 %       ±6.85%  ±9.14% ±11.95%
buffers/buffer-iterate.js n=1000 method='iterator' type='fast' size=4096                                                                                        0.93 %       ±6.10%  ±8.11% ±10.56%
buffers/buffer-iterate.js n=1000 method='iterator' type='fast' size=512                                                                                        -1.35 %       ±2.70%  ±3.60%  ±4.69%
buffers/buffer-normalize-encoding.js n=1000000 encoding='ascii'                                                                                                -0.36 %       ±1.40%  ±1.86%  ±2.42%
buffers/buffer-normalize-encoding.js n=1000000 encoding='base64'                                                                                               -0.70 %       ±1.19%  ±1.59%  ±2.07%
buffers/buffer-normalize-encoding.js n=1000000 encoding='BASE64'                                                                                                0.14 %       ±0.80%  ±1.06%  ±1.38%
buffers/buffer-normalize-encoding.js n=1000000 encoding='binary'                                                                                                0.21 %       ±0.89%  ±1.18%  ±1.54%
buffers/buffer-normalize-encoding.js n=1000000 encoding='hex'                                                                                                  -0.76 %       ±1.32%  ±1.75%  ±2.28%
buffers/buffer-normalize-encoding.js n=1000000 encoding='HEX'                                                                                                  -0.52 %       ±1.25%  ±1.66%  ±2.16%
buffers/buffer-normalize-encoding.js n=1000000 encoding='latin1'                                                                                                0.39 %       ±1.27%  ±1.69%  ±2.20%
buffers/buffer-normalize-encoding.js n=1000000 encoding='LATIN1'                                                                                                0.15 %       ±0.79%  ±1.05%  ±1.37%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UCS-2'                                                                                                -0.50 %       ±0.99%  ±1.32%  ±1.73%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UCS2'                                                                                                  2.52 %       ±2.83%  ±3.80%  ±5.02%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf-16le'                                                                                             -1.44 %       ±2.64%  ±3.54%  ±4.65%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UTF-16LE'                                                                                       *     -1.11 %       ±1.05%  ±1.39%  ±1.81%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf-8'                                                                                                -0.74 %       ±2.45%  ±3.27%  ±4.29%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf16le'                                                                                              -2.64 %       ±2.73%  ±3.66%  ±4.81%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UTF16LE'                                                                                              -0.40 %       ±1.14%  ±1.51%  ±1.97%
buffers/buffer-normalize-encoding.js n=1000000 encoding='utf8'                                                                                                 -1.04 %       ±2.32%  ±3.09%  ±4.02%
buffers/buffer-normalize-encoding.js n=1000000 encoding='UTF8'                                                                                                 -0.79 %       ±1.35%  ±1.79%  ±2.33%
buffers/buffer-read-float.js n=1000000 value='big' endian='LE' type='Double'                                                                                    0.33 %       ±0.91%  ±1.22%  ±1.59%
buffers/buffer-read-float.js n=1000000 value='big' endian='LE' type='Float'                                                                                    -0.63 %       ±1.30%  ±1.73%  ±2.26%
buffers/buffer-read-float.js n=1000000 value='inf' endian='LE' type='Double'                                                                                    0.30 %       ±0.83%  ±1.11%  ±1.45%
buffers/buffer-read-float.js n=1000000 value='inf' endian='LE' type='Float'                                                                                     1.36 %       ±2.60%  ±3.48%  ±4.60%
buffers/buffer-read-float.js n=1000000 value='nan' endian='LE' type='Double'                                                                                   -0.12 %       ±1.04%  ±1.38%  ±1.80%
buffers/buffer-read-float.js n=1000000 value='nan' endian='LE' type='Float'                                                                                    -0.46 %       ±1.27%  ±1.70%  ±2.22%
buffers/buffer-read-float.js n=1000000 value='small' endian='LE' type='Double'                                                                                 -0.07 %       ±0.77%  ±1.03%  ±1.34%
buffers/buffer-read-float.js n=1000000 value='small' endian='LE' type='Float'                                                                                  -0.32 %       ±1.41%  ±1.88%  ±2.45%
buffers/buffer-read-float.js n=1000000 value='zero' endian='LE' type='Double'                                                                                   0.01 %       ±0.72%  ±0.97%  ±1.26%
buffers/buffer-read-float.js n=1000000 value='zero' endian='LE' type='Float'                                                                                   -1.04 %       ±2.34%  ±3.11%  ±4.05%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='IntBE' buffer='fast'                                                                       -0.02 %       ±0.72%  ±0.96%  ±1.26%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='IntLE' buffer='fast'                                                                **     -0.96 %       ±0.69%  ±0.92%  ±1.20%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='UIntBE' buffer='fast'                                                                      -0.17 %       ±0.82%  ±1.09%  ±1.43%
buffers/buffer-read-with-byteLength.js byteLength=1 n=1000000 type='UIntLE' buffer='fast'                                                               **      1.15 %       ±0.66%  ±0.88%  ±1.15%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='IntBE' buffer='fast'                                                                        0.60 %       ±1.32%  ±1.77%  ±2.32%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='IntLE' buffer='fast'                                                                        0.63 %       ±0.79%  ±1.05%  ±1.36%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='UIntBE' buffer='fast'                                                                       0.77 %       ±1.49%  ±2.00%  ±2.63%
buffers/buffer-read-with-byteLength.js byteLength=2 n=1000000 type='UIntLE' buffer='fast'                                                               **      1.19 %       ±0.73%  ±0.97%  ±1.26%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='IntBE' buffer='fast'                                                                       -0.22 %       ±0.93%  ±1.23%  ±1.61%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='IntLE' buffer='fast'                                                                        0.28 %       ±0.94%  ±1.25%  ±1.63%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='UIntBE' buffer='fast'                                                                       0.16 %       ±0.86%  ±1.14%  ±1.49%
buffers/buffer-read-with-byteLength.js byteLength=3 n=1000000 type='UIntLE' buffer='fast'                                                                       0.20 %       ±0.93%  ±1.23%  ±1.60%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='IntBE' buffer='fast'                                                                       -0.39 %       ±0.68%  ±0.90%  ±1.17%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='IntLE' buffer='fast'                                                                       -0.70 %       ±0.70%  ±0.94%  ±1.22%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='UIntBE' buffer='fast'                                                                       0.07 %       ±0.76%  ±1.01%  ±1.32%
buffers/buffer-read-with-byteLength.js byteLength=4 n=1000000 type='UIntLE' buffer='fast'                                                                      -0.30 %       ±0.69%  ±0.91%  ±1.19%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='IntBE' buffer='fast'                                                                       -0.21 %       ±0.99%  ±1.31%  ±1.71%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='IntLE' buffer='fast'                                                                       -0.07 %       ±0.98%  ±1.31%  ±1.71%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='UIntBE' buffer='fast'                                                                      -1.57 %       ±1.93%  ±2.57%  ±3.34%
buffers/buffer-read-with-byteLength.js byteLength=5 n=1000000 type='UIntLE' buffer='fast'                                                                      -0.48 %       ±1.72%  ±2.30%  ±3.04%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='IntBE' buffer='fast'                                                                        0.76 %       ±1.07%  ±1.42%  ±1.85%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='IntLE' buffer='fast'                                                                       -0.80 %       ±1.38%  ±1.84%  ±2.41%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='UIntBE' buffer='fast'                                                                       0.27 %       ±0.86%  ±1.15%  ±1.50%
buffers/buffer-read-with-byteLength.js byteLength=6 n=1000000 type='UIntLE' buffer='fast'                                                                      -1.21 %       ±1.24%  ±1.66%  ±2.18%
buffers/buffer-read.js n=1000000 type='BigInt64BE' buffer='fast'                                                                                               -0.83 %       ±1.32%  ±1.76%  ±2.29%
buffers/buffer-read.js n=1000000 type='BigInt64LE' buffer='fast'                                                                                               -0.24 %       ±1.30%  ±1.73%  ±2.25%
buffers/buffer-read.js n=1000000 type='BigUInt64BE' buffer='fast'                                                                                              -0.07 %       ±1.15%  ±1.53%  ±1.99%
buffers/buffer-read.js n=1000000 type='BigUInt64LE' buffer='fast'                                                                                              -0.19 %       ±1.37%  ±1.83%  ±2.40%
buffers/buffer-read.js n=1000000 type='Int16BE' buffer='fast'                                                                                                  -2.09 %       ±2.90%  ±3.89%  ±5.13%
buffers/buffer-read.js n=1000000 type='Int16LE' buffer='fast'                                                                                                  -0.07 %       ±1.12%  ±1.49%  ±1.94%
buffers/buffer-read.js n=1000000 type='Int32BE' buffer='fast'                                                                                                  -0.59 %       ±3.28%  ±4.41%  ±5.84%
buffers/buffer-read.js n=1000000 type='Int32LE' buffer='fast'                                                                                                   0.38 %       ±1.18%  ±1.57%  ±2.05%
buffers/buffer-read.js n=1000000 type='Int8' buffer='fast'                                                                                                      0.87 %       ±1.16%  ±1.54%  ±2.00%
buffers/buffer-read.js n=1000000 type='UInt16BE' buffer='fast'                                                                                                  0.64 %       ±1.12%  ±1.50%  ±1.95%
buffers/buffer-read.js n=1000000 type='UInt16LE' buffer='fast'                                                                                                 -0.79 %       ±1.02%  ±1.36%  ±1.77%
buffers/buffer-read.js n=1000000 type='UInt32BE' buffer='fast'                                                                                                 -0.50 %       ±1.39%  ±1.85%  ±2.40%
buffers/buffer-read.js n=1000000 type='UInt32LE' buffer='fast'                                                                                                 -0.32 %       ±0.91%  ±1.22%  ±1.59%
buffers/buffer-read.js n=1000000 type='UInt8' buffer='fast'                                                                                                     0.88 %       ±3.73%  ±5.01%  ±6.62%
buffers/buffer-slice.js n=1000000 type='fast'                                                                                                                  -5.05 %       ±5.47%  ±7.37%  ±9.79%
buffers/buffer-slice.js n=1000000 type='slow'                                                                                                                   1.11 %       ±6.99%  ±9.31% ±12.12%
buffers/buffer-slice.js n=1000000 type='subarray'                                                                                                               3.96 %       ±7.25%  ±9.68% ±12.68%
buffers/buffer-swap.js n=1000000 len=1024 method='swap16' aligned='false'                                                                                       0.24 %       ±0.61%  ±0.81%  ±1.07%
buffers/buffer-swap.js n=1000000 len=1024 method='swap16' aligned='true'                                                                                        0.10 %       ±1.95%  ±2.60%  ±3.38%
buffers/buffer-swap.js n=1000000 len=1024 method='swap32' aligned='false'                                                                                      -0.18 %       ±0.34%  ±0.45%  ±0.58%
buffers/buffer-swap.js n=1000000 len=1024 method='swap32' aligned='true'                                                                                       -0.05 %       ±0.20%  ±0.26%  ±0.34%
buffers/buffer-swap.js n=1000000 len=1024 method='swap64' aligned='false'                                                                                       0.13 %       ±0.33%  ±0.44%  ±0.58%
buffers/buffer-swap.js n=1000000 len=1024 method='swap64' aligned='true'                                                                                        0.29 %       ±0.48%  ±0.64%  ±0.84%
buffers/buffer-swap.js n=1000000 len=2056 method='swap16' aligned='false'                                                                                       0.08 %       ±0.35%  ±0.46%  ±0.60%
buffers/buffer-swap.js n=1000000 len=2056 method='swap16' aligned='true'                                                                                        0.41 %       ±0.48%  ±0.65%  ±0.86%
buffers/buffer-swap.js n=1000000 len=2056 method='swap32' aligned='false'                                                                                      -0.02 %       ±0.20%  ±0.27%  ±0.35%
buffers/buffer-swap.js n=1000000 len=2056 method='swap32' aligned='true'                                                                                        0.15 %       ±0.22%  ±0.30%  ±0.39%
buffers/buffer-swap.js n=1000000 len=2056 method='swap64' aligned='false'                                                                                *     -0.35 %       ±0.35%  ±0.47%  ±0.61%
buffers/buffer-swap.js n=1000000 len=2056 method='swap64' aligned='true'                                                                                        0.14 %       ±0.24%  ±0.32%  ±0.42%
buffers/buffer-swap.js n=1000000 len=256 method='swap16' aligned='false'                                                                                       -0.57 %       ±6.75%  ±8.99% ±11.71%
buffers/buffer-swap.js n=1000000 len=256 method='swap16' aligned='true'                                                                                         1.51 %       ±9.42% ±12.54% ±16.35%
buffers/buffer-swap.js n=1000000 len=256 method='swap32' aligned='false'                                                                                       -0.51 %       ±3.49%  ±4.65%  ±6.05%
buffers/buffer-swap.js n=1000000 len=256 method='swap32' aligned='true'                                                                                         0.10 %       ±2.97%  ±3.95%  ±5.14%
buffers/buffer-swap.js n=1000000 len=256 method='swap64' aligned='false'                                                                                       -1.35 %       ±4.81%  ±6.40%  ±8.34%
buffers/buffer-swap.js n=1000000 len=256 method='swap64' aligned='true'                                                                                        -0.66 %       ±5.42%  ±7.22%  ±9.39%
buffers/buffer-swap.js n=1000000 len=64 method='swap16' aligned='false'                                                                                        -1.91 %       ±3.38%  ±4.52%  ±5.92%
buffers/buffer-swap.js n=1000000 len=64 method='swap16' aligned='true'                                                                                         -0.98 %       ±7.28%  ±9.70% ±12.63%
buffers/buffer-swap.js n=1000000 len=64 method='swap32' aligned='false'                                                                                        -2.28 %       ±6.46%  ±8.60% ±11.20%
buffers/buffer-swap.js n=1000000 len=64 method='swap32' aligned='true'                                                                                         -1.36 %       ±5.94%  ±7.91% ±10.31%
buffers/buffer-swap.js n=1000000 len=64 method='swap64' aligned='false'                                                                                        -2.87 %       ±6.02%  ±8.02% ±10.45%
buffers/buffer-swap.js n=1000000 len=64 method='swap64' aligned='true'                                                                                         -2.79 %       ±6.96%  ±9.26% ±12.05%
buffers/buffer-swap.js n=1000000 len=768 method='swap16' aligned='false'                                                                                       -0.17 %       ±0.59%  ±0.78%  ±1.02%
buffers/buffer-swap.js n=1000000 len=768 method='swap16' aligned='true'                                                                                        -1.43 %       ±3.41%  ±4.54%  ±5.91%
buffers/buffer-swap.js n=1000000 len=768 method='swap32' aligned='false'                                                                                       -0.30 %       ±0.30%  ±0.40%  ±0.52%
buffers/buffer-swap.js n=1000000 len=768 method='swap32' aligned='true'                                                                                        -0.24 %       ±0.49%  ±0.65%  ±0.86%
buffers/buffer-swap.js n=1000000 len=768 method='swap64' aligned='false'                                                                                        0.68 %       ±1.42%  ±1.89%  ±2.46%
buffers/buffer-swap.js n=1000000 len=768 method='swap64' aligned='true'                                                                                         0.02 %       ±0.59%  ±0.78%  ±1.02%
buffers/buffer-swap.js n=1000000 len=8192 method='swap16' aligned='false'                                                                                       0.08 %       ±0.24%  ±0.33%  ±0.43%
buffers/buffer-swap.js n=1000000 len=8192 method='swap16' aligned='true'                                                                                        0.00 %       ±0.13%  ±0.18%  ±0.23%
buffers/buffer-swap.js n=1000000 len=8192 method='swap32' aligned='false'                                                                                      -0.07 %       ±0.10%  ±0.14%  ±0.18%
buffers/buffer-swap.js n=1000000 len=8192 method='swap32' aligned='true'                                                                                        0.02 %       ±0.11%  ±0.14%  ±0.19%
buffers/buffer-swap.js n=1000000 len=8192 method='swap64' aligned='false'                                                                                      -0.08 %       ±0.19%  ±0.25%  ±0.33%
buffers/buffer-swap.js n=1000000 len=8192 method='swap64' aligned='true'                                                                                        0.06 %       ±0.15%  ±0.20%  ±0.25%
buffers/buffer-tojson.js len=0 n=10000                                                                                                                         -1.18 %       ±3.56%  ±4.74%  ±6.17%
buffers/buffer-tojson.js len=256 n=10000                                                                                                                       -0.27 %       ±1.23%  ±1.64%  ±2.13%
buffers/buffer-tojson.js len=4096 n=10000                                                                                                                      -1.89 %       ±3.65%  ±4.90%  ±6.48%
buffers/buffer-tostring.js n=1000000 len=1 args=0 encoding=''                                                                                                   3.00 %       ±9.18% ±12.21% ±15.89%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='ascii'                                                                                             -0.38 %       ±5.88%  ±7.82% ±10.18%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='hex'                                                                                               -4.63 %       ±7.11%  ±9.47% ±12.34%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='latin1'                                                                                             3.73 %       ±8.24% ±10.96% ±14.27%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='UCS-2'                                                                                              1.40 %       ±6.60%  ±8.78% ±11.43%
buffers/buffer-tostring.js n=1000000 len=1 args=1 encoding='utf8'                                                                                              -3.15 %       ±9.08% ±12.09% ±15.73%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='ascii'                                                                                             -0.82 %       ±6.66%  ±8.86% ±11.53%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='hex'                                                                                                1.81 %       ±7.19%  ±9.56% ±12.45%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='latin1'                                                                                            -3.15 %       ±8.00% ±10.64% ±13.86%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='UCS-2'                                                                                              1.46 %       ±6.30%  ±8.38% ±10.91%
buffers/buffer-tostring.js n=1000000 len=1 args=3 encoding='utf8'                                                                                              -6.20 %       ±6.31%  ±8.41% ±10.96%
buffers/buffer-tostring.js n=1000000 len=1024 args=0 encoding=''                                                                                                3.80 %       ±4.59%  ±6.11%  ±7.95%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='ascii'                                                                                           0.60 %       ±3.82%  ±5.08%  ±6.61%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='hex'                                                                                             0.25 %       ±0.66%  ±0.87%  ±1.14%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='latin1'                                                                                         -1.69 %       ±3.66%  ±4.87%  ±6.34%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='UCS-2'                                                                                          -0.30 %       ±3.60%  ±4.79%  ±6.24%
buffers/buffer-tostring.js n=1000000 len=1024 args=1 encoding='utf8'                                                                                           -0.71 %       ±3.69%  ±4.91%  ±6.39%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='ascii'                                                                                           2.53 %       ±3.86%  ±5.14%  ±6.70%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='hex'                                                                                             0.05 %       ±0.81%  ±1.07%  ±1.40%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='latin1'                                                                                         -0.63 %       ±3.50%  ±4.66%  ±6.07%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='UCS-2'                                                                                           2.74 %       ±3.89%  ±5.18%  ±6.75%
buffers/buffer-tostring.js n=1000000 len=1024 args=3 encoding='utf8'                                                                                            0.38 %       ±3.74%  ±4.97%  ±6.48%
buffers/buffer-tostring.js n=1000000 len=64 args=0 encoding=''                                                                                                  7.62 %       ±9.62% ±12.81% ±16.67%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='ascii'                                                                                            -3.84 %       ±6.10%  ±8.12% ±10.58%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='hex'                                                                                              -0.21 %       ±4.13%  ±5.50%  ±7.16%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='latin1'                                                                                           -1.28 %       ±6.93%  ±9.21% ±11.99%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='UCS-2'                                                                                            -0.68 %       ±5.78%  ±7.70% ±10.02%
buffers/buffer-tostring.js n=1000000 len=64 args=1 encoding='utf8'                                                                                             -2.81 %       ±6.59%  ±8.77% ±11.41%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='ascii'                                                                                             1.32 %       ±7.00%  ±9.31% ±12.12%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='hex'                                                                                        *      3.99 %       ±3.95%  ±5.26%  ±6.85%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='latin1'                                                                                           -0.30 %       ±6.70%  ±8.92% ±11.62%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='UCS-2'                                                                                            -4.11 %       ±4.68%  ±6.25%  ±8.17%
buffers/buffer-tostring.js n=1000000 len=64 args=3 encoding='utf8'                                                                                              6.57 %       ±6.57%  ±8.76% ±11.43%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding=''                                                                                          -0.86 %       ±4.80%  ±6.40%  ±8.33%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='ascii'                                                                                     -1.24 %       ±3.65%  ±4.86%  ±6.33%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='hex'                                                                                       -0.58 %       ±1.18%  ±1.57%  ±2.04%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='latin1'                                                                                    -3.21 %       ±6.02%  ±8.01% ±10.42%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='utf16le'                                                                                   -1.28 %       ±5.61%  ±7.47%  ±9.72%
buffers/buffer-write-string.js n=1000000 len=2048 args='' encoding='utf8'                                                                                      -0.97 %       ±3.99%  ±5.31%  ±6.91%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding=''                                                                                    -0.76 %       ±5.53%  ±7.35%  ±9.57%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='ascii'                                                                                0.65 %       ±6.55%  ±8.72% ±11.34%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='hex'                                                                                  0.23 %       ±2.77%  ±3.68%  ±4.79%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='latin1'                                                                              -6.65 %       ±6.87%  ±9.15% ±11.91%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='utf16le'                                                                              3.79 %       ±6.24%  ±8.30% ±10.80%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset' encoding='utf8'                                                                                 2.24 %       ±4.00%  ±5.33%  ±6.94%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding=''                                                                              2.53 %       ±4.39%  ±5.84%  ±7.60%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='ascii'                                                                        -5.97 %       ±6.59%  ±8.77% ±11.42%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='hex'                                                                    *      1.50 %       ±1.40%  ±1.87%  ±2.43%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='latin1'                                                                 *     -6.02 %       ±5.36%  ±7.13%  ±9.28%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='utf16le'                                                                       0.80 %       ±5.30%  ±7.05%  ±9.18%
buffers/buffer-write-string.js n=1000000 len=2048 args='offset+length' encoding='utf8'                                                                          1.70 %       ±2.66%  ±3.55%  ±4.63%
buffers/buffer-write.js n=1000000 type='BigInt64BE' buffer='fast'                                                                                               3.28 %       ±8.07% ±10.74% ±13.99%
buffers/buffer-write.js n=1000000 type='BigInt64LE' buffer='fast'                                                                                              -2.96 %       ±7.04%  ±9.37% ±12.20%
buffers/buffer-write.js n=1000000 type='BigUInt64BE' buffer='fast'                                                                                             -0.58 %       ±5.55%  ±7.40%  ±9.64%
buffers/buffer-write.js n=1000000 type='BigUInt64LE' buffer='fast'                                                                                             -0.37 %       ±5.11%  ±6.80%  ±8.86%
buffers/buffer-write.js n=1000000 type='DoubleBE' buffer='fast'                                                                                                 4.18 %       ±6.78%  ±9.04% ±11.81%
buffers/buffer-write.js n=1000000 type='DoubleLE' buffer='fast'                                                                                                -5.04 %       ±7.62% ±10.15% ±13.21%
buffers/buffer-write.js n=1000000 type='FloatBE' buffer='fast'                                                                                                  2.64 %       ±7.63% ±10.16% ±13.23%
buffers/buffer-write.js n=1000000 type='FloatLE' buffer='fast'                                                                                                 -3.47 %       ±8.13% ±10.82% ±14.08%
buffers/buffer-write.js n=1000000 type='Int16BE' buffer='fast'                                                                                                  3.74 %       ±8.60% ±11.45% ±14.90%
buffers/buffer-write.js n=1000000 type='Int16LE' buffer='fast'                                                                                                 -0.60 %       ±7.93% ±10.56% ±13.74%
buffers/buffer-write.js n=1000000 type='Int32BE' buffer='fast'                                                                                                  5.00 %       ±8.41% ±11.19% ±14.56%
buffers/buffer-write.js n=1000000 type='Int32LE' buffer='fast'                                                                                                 -4.70 %       ±7.65% ±10.18% ±13.25%
buffers/buffer-write.js n=1000000 type='Int8' buffer='fast'                                                                                                    -0.20 %       ±9.59% ±12.76% ±16.61%
buffers/buffer-write.js n=1000000 type='IntBE' buffer='fast'                                                                                                    9.04 %      ±15.33% ±20.41% ±26.59%
buffers/buffer-write.js n=1000000 type='IntLE' buffer='fast'                                                                                                   -8.14 %      ±10.82% ±14.41% ±18.78%
buffers/buffer-write.js n=1000000 type='UInt16BE' buffer='fast'                                                                                                 0.20 %       ±8.80% ±11.71% ±15.24%
buffers/buffer-write.js n=1000000 type='UInt16LE' buffer='fast'                                                                                          *     -8.94 %       ±7.96% ±10.59% ±13.78%
buffers/buffer-write.js n=1000000 type='UInt32BE' buffer='fast'                                                                                                -1.89 %       ±7.77% ±10.34% ±13.46%
buffers/buffer-write.js n=1000000 type='UInt32LE' buffer='fast'                                                                                                -5.75 %       ±8.03% ±10.69% ±13.91%
buffers/buffer-write.js n=1000000 type='UInt8' buffer='fast'                                                                                             *     -8.90 %       ±8.01% ±10.65% ±13.87%
buffers/buffer-write.js n=1000000 type='UIntBE' buffer='fast'                                                                                                   4.93 %       ±8.55% ±11.38% ±14.82%
buffers/buffer-write.js n=1000000 type='UIntLE' buffer='fast'                                                                                                   5.94 %       ±9.16% ±12.18% ±15.85%
buffers/buffer-zero.js type='buffer' n=1000000                                                                                                                 -1.04 %       ±3.46%  ±4.64%  ±6.11%
buffers/buffer-zero.js type='string' n=1000000                                                                                                                  1.64 %       ±4.26%  ±5.73%  ±7.60%
buffers/dataview-set.js n=1000000 type='Float32BE'                                                                                                              1.52 %       ±2.96%  ±3.96%  ±5.21%
buffers/dataview-set.js n=1000000 type='Float32LE'                                                                                                             -0.08 %       ±0.64%  ±0.85%  ±1.11%
buffers/dataview-set.js n=1000000 type='Float64BE'                                                                                                              0.21 %       ±0.90%  ±1.21%  ±1.59%
buffers/dataview-set.js n=1000000 type='Float64LE'                                                                                                              0.73 %       ±1.17%  ±1.57%  ±2.08%
buffers/dataview-set.js n=1000000 type='Int16BE'                                                                                                                0.18 %       ±1.17%  ±1.55%  ±2.03%
buffers/dataview-set.js n=1000000 type='Int16LE'                                                                                                                2.71 %       ±4.03%  ±5.41%  ±7.15%
buffers/dataview-set.js n=1000000 type='Int32BE'                                                                                                                2.20 %       ±2.71%  ±3.63%  ±4.79%
buffers/dataview-set.js n=1000000 type='Int32LE'                                                                                                                0.49 %       ±1.28%  ±1.71%  ±2.23%
buffers/dataview-set.js n=1000000 type='Int8'                                                                                                                   0.82 %       ±1.29%  ±1.72%  ±2.24%
buffers/dataview-set.js n=1000000 type='Uint16BE'                                                                                                              -0.03 %       ±1.09%  ±1.45%  ±1.89%
buffers/dataview-set.js n=1000000 type='Uint16LE'                                                                                                              -0.23 %       ±1.31%  ±1.75%  ±2.27%
buffers/dataview-set.js n=1000000 type='Uint32BE'                                                                                                              -0.97 %       ±3.14%  ±4.23%  ±5.61%
buffers/dataview-set.js n=1000000 type='Uint32LE'                                                                                                              -0.41 %       ±0.65%  ±0.87%  ±1.13%
buffers/dataview-set.js n=1000000 type='Uint8'                                                                                                                  0.34 %       ±1.10%  ±1.46%  ±1.91%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case, there are 388 comparisons, you can thus
expect the following amount of false-positive results:
  19.40 false positives, when considering a   5% risk acceptance (*, **, ***),
  3.88 false positives, when considering a   1% risk acceptance (**, ***),
  0.39 false positives, when considering a 0.1% risk acceptance (***)

@H4ad H4ad linked an issue Nov 8, 2023 that may be closed by this pull request
@debadree25 debadree25 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Nov 9, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@debadree25 debadree25 added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 10, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 10, 2023
@nodejs-github-bot nodejs-github-bot merged commit 89c66ae into nodejs:main Nov 10, 2023
56 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 89c66ae

targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #50621
Refs: #50620
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
targos pushed a commit that referenced this pull request Nov 14, 2023
PR-URL: #50621
Refs: #50620
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Septa2112 added a commit to Septa2112/node that referenced this pull request Dec 4, 2023
Improve performance of areSimilarFloatArrays by using primordial.

Refs: nodejs#50621
nodejs-github-bot pushed a commit that referenced this pull request Dec 10, 2023
Improve performance of areSimilarFloatArrays by using primordial.

Refs: #50621
PR-URL: #51040
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
PR-URL: #50621
Refs: #50620
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
RafaelGSS pushed a commit that referenced this pull request Dec 15, 2023
Improve performance of areSimilarFloatArrays by using primordial.

Refs: #50621
PR-URL: #51040
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Improve performance of areSimilarFloatArrays by using primordial.

Refs: #50621
PR-URL: #51040
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. buffer Issues and PRs related to the buffer subsystem. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buffer.byteLength Performance Regression from v18.x to v22.x
6 participants