Commit Graph

8 Commits

Author SHA1 Message Date
Antoine du Hamel
95434fbf28
benchmark: add trailing commas in benchmark/buffers
PR-URL: https://github.com/nodejs/node/pull/46473
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-02-04 18:19:25 +00:00
dnlup
bfce726be6
benchmark: use let/const instead of var in buffers
PR-URL: https://github.com/nodejs/node/pull/30945
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-12-16 11:16:31 +01:00
Ruben Bridgewater
7b802685c4 benchmark: refactor buffer benchmarks
Currently the buffer benchmarks take significantly too long to
complete. This drastically reduces the overall runtime by removing
obsolete checked variations and reducing the iteration count.

It also improves the benchmarks by removing the deprecated
`new Buffer(size)` usage and some other small improvements.

PR-URL: https://github.com/nodejs/node/pull/26418
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Peter Marshall <petermarshall@chromium.org>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-20 12:55:50 -06:00
juggernaut451
b80da63b99
benchmark: changed millions and thousands to n
PR-URL: https://github.com/nodejs/node/pull/18917
Fixes: https://github.com/nodejs/node/issues/18778
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-04-10 00:22:33 +02:00
Ruben Bridgewater
8e3d7623a5
benchmark: (buffers) use destructuring
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-23 01:29:31 +01:00
Bartosz Sosnowski
05ac6e1b01 benchmark: remove forced optimization from buffer
This removes all instances of %OptimizeFunctionOnNextCall from buffer
benchmarks

PR-URL: https://github.com/nodejs/node/pull/9615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-03-06 16:31:56 +01:00
Brian White
9e0f6a5eb4
buffer: improve compare() performance
PR-URL: https://github.com/nodejs/node/pull/10927
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-25 01:42:42 -05:00
Rich Trott
ffdc046e5c benchmark: add benchmark for buf.compare()
There is a benchmark for the class method `Buffer.compare()` but not for
the instance method `buf.compare()`. This adds that benchmark.

I used this to confirm a performance regression in an implementation I
was considering. While the implementation was a bust, it does seem like
the benchmark is worthwhile.

The benchmark is nearly identical to the existing `Buffer.compare()`
benchmark except, of course, that it calls `buf.compare()` instead.

PR-URL: https://github.com/nodejs/node/pull/5441
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-27 20:17:56 -08:00