Giovanni Bucci
1b8d1d3a3a
util: expose diff function used by the assertion errors
...
fix: https://github.com/nodejs/node/issues/51740
PR-URL: https://github.com/nodejs/node/pull/57462
Fixes: https://github.com/nodejs/node/issues/51740
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-03-23 11:07:43 +01:00
Ruben Bridgewater
7b72396c8b
assert: improve partialDeepStrictEqual performance
...
This implements fast paths for typed arrays, array buffers and sets
and maps that contain only objects as keys.
PR-URL: https://github.com/nodejs/node/pull/57509
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2025-03-23 11:07:43 +01:00
Ruben Bridgewater
d52a71f832
benchmark: adjust assert runtimes
...
Each file should have a reasonable runtime while having a good
accuracy. This adjust those up and down to have minimal runtimes
with a good accuracy.
PR-URL: https://github.com/nodejs/node/pull/57370
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-03-18 11:14:11 +01:00
Ruben Bridgewater
7592cf4cd7
benchmark: skip running some assert benchmarks by default
...
These benchmarks are not frequently needed and just slow down the
default benchmark suite. They are kept for users who want to run
them but deactivated by default.
PR-URL: https://github.com/nodejs/node/pull/57370
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-03-18 11:14:10 +01:00
Ruben Bridgewater
e4cc54a746
benchmark: add assert partialDeepStrictEqual benchmark
...
The current settings deactivate the extraProps handling, due to
the current implementation failing on these cases.
PR-URL: https://github.com/nodejs/node/pull/57370
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-03-18 11:14:10 +01:00
Michaël Zasso
8e64d38e91
tools: import rather than require ESLint plugins
...
Refs: https://github.com/nodejs/node/pull/57314
PR-URL: https://github.com/nodejs/node/pull/57315
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-03-09 11:38:43 +01:00
Giovanni Bucci
2daee76b26
assert: improve myers diff performance
...
fix: https://github.com/nodejs/node/issues/57242
PR-URL: https://github.com/nodejs/node/pull/57279
Fixes: https://github.com/nodejs/node/issues/57242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-03-09 11:38:42 +01:00
Elves Vieira
f4a82fddb1
benchmark: add a warmup on bench-openSync
...
PR-URL: https://github.com/nodejs/node/pull/57051
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
2025-02-17 10:46:02 +01:00
Jan Krems
4cc7907738
zlib: add zstd support
...
Fixes: https://github.com/nodejs/node/issues/48412
PR-URL: https://github.com/nodejs/node/pull/52100
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-02-10 15:15:04 +01:00
James M Snell
0ee9c34d63
benchmark: add simple parse and test benchmarks for URLPattern
...
PR-URL: https://github.com/nodejs/node/pull/56882
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-02-05 10:35:42 +01:00
Chengzhong Wu
2fb007fdce
lib: allow skipping source maps in node_modules
...
Files in `node_modules` are not authored by the user directly and the
original sources are less relevant to the user.
Skipping source maps in `node_modules` improves the general
performance. Add `module.setSourceMapsSupport(enabled, options)` to
skip source maps in `node_modules` if it is needed. This moves
all source maps related API to `node:module` and this a step to
promote the source maps API to stable.
PR-URL: https://github.com/nodejs/node/pull/56639
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-01-30 10:44:33 +01:00
Rafael Gonzaga
4aa1afd607
benchmark: add validateStream to styleText bench
...
PR-URL: https://github.com/nodejs/node/pull/56556
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-30 10:44:13 +01:00
Pietro Marchini
c4979ebfb2
test_runner: run single test file benchmark
...
PR-URL: https://github.com/nodejs/node/pull/56479
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-01-30 10:44:10 +01:00
Marco Ippolito
e5ba216501
module: unflag --experimental-strip-types
...
PR-URL: https://github.com/nodejs/node/pull/56350
Fixes: https://github.com/nodejs/typescript/issues/17
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2025-01-02 15:28:49 +01:00
Chengzhong Wu
e4b795ec4a
lib: optimize prepareStackTrace on builtin frames
...
Only invalidates source map lookup cache when a new source map is found.
This improves when user codes interleave with builtin functions, like
`array.map`.
PR-URL: https://github.com/nodejs/node/pull/56299
Refs: https://github.com/nodejs/node/issues/56296
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2025-01-02 15:13:18 +01:00
Rafael Gonzaga
efcc5d90c5
src,lib: stabilize permission model
...
Move permission model from 1.1 (Active Development)
to 2.0 (Stable).
PR-URL: https://github.com/nodejs/node/pull/56201
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-12-18 22:31:01 +01:00
Mert Can Altin
9eccd7dba9
util: add fast path for Latin1 decoding
...
PR-URL: https://github.com/nodejs/node/pull/55275
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
2024-12-06 15:25:33 +01:00
Aviv Keller
32e5bbca95
benchmark: add test-reporters
...
PR-URL: https://github.com/nodejs/node/pull/55757
Refs: https://github.com/nodejs/node/issues/55723
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
2024-11-16 18:00:56 +01:00
Aviv Keller
c2103354e6
benchmark: add test_runner/mock-fn
...
PR-URL: https://github.com/nodejs/node/pull/55771
Refs: https://github.com/nodejs/node/issues/55723
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-11-16 18:00:55 +01:00
Chengzhong Wu
00e092bb4b
util: fix util.getCallSites plurality
...
`util.getCallSite` returns an array of call site objects. Rename the
function to reflect that it returns a given count of frames captured
as an array of call site object.
Renames the first parameter `frames` to be `frameCount` to indicate
that it specifies the count of returned call sites.
PR-URL: https://github.com/nodejs/node/pull/55626
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-11-16 18:00:30 +01:00
RafaelGSS
34483a299b
benchmark: add nodeTiming.uvmetricsinfo bench
...
PR-URL: https://github.com/nodejs/node/pull/55614
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-11-01 16:00:18 -03:00
Rafael Gonzaga
aca03d9083
benchmark: add --runs support to run.js
...
PR-URL: https://github.com/nodejs/node/pull/55158
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-10-19 10:54:39 +02:00
Rafael Gonzaga
c5abf50692
benchmark: adjust byte size for buffer-copy
...
PR-URL: https://github.com/nodejs/node/pull/55295
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-10-19 10:54:36 +02:00
Robert Nagy
8ceefebaf2
events: optimize EventTarget.addEventListener
...
PR-URL: https://github.com/nodejs/node/pull/55312
Fixes: https://github.com/nodejs/node/issues/55311
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-10-19 10:54:35 +02:00
Rafael Gonzaga
d3618b2334
benchmark: adjust config for deepEqual object
...
This should make easier to read on benchmark/compare
and when generating graphs
PR-URL: https://github.com/nodejs/node/pull/55254
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-10-19 10:54:27 +02:00
Joyee Cheung
4eeeab09f0
benchmark: rewrite detect-esm-syntax benchmark
...
Syntax detection has been unflagged so it's no longer meaningful
to toggle the detection based on CLI flags. It was also previously
benchmarking cached module imports which isn't very meaningful
for subsequent loads. This patch updates the benchmark to toggle
the detection based on the presence of type field in the package.json,
and generates fixtures to benchmark fresh module loads.
PR-URL: https://github.com/nodejs/node/pull/55238
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-10-09 14:16:01 +00:00
Aviv Keller
71785889c8
lib: prefer logical assignment
...
PR-URL: https://github.com/nodejs/node/pull/55044
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2024-10-09 06:42:16 +00:00
Rafael Gonzaga
834316d541
benchmark: add no-warnings to process.has bench
...
PR-URL: https://github.com/nodejs/node/pull/55159
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-09-30 20:27:39 +00:00
Sonny
090add7864
fs: refactoring declaratively with Array.fromAsync
...
Refs: https://github.com/nodejs/node/pull/51912
PR-URL: https://github.com/nodejs/node/pull/54644
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2024-09-27 11:59:09 +02:00
Marco Ippolito
00d4f8073c
benchmark: create benchmark for typescript
...
PR-URL: https://github.com/nodejs/node/pull/54904
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-09-25 17:25:18 +00:00
jakecastelli
96ec7eede9
benchmark: add webstorage benchmark
...
PR-URL: https://github.com/nodejs/node/pull/55040
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-09-23 13:46:14 +00:00
Rafael Gonzaga
29357cb0ef
benchmark: include ascii to fs/readfile
...
PR-URL: https://github.com/nodejs/node/pull/54988
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-09-19 20:15:47 +00:00
Aviv Keller
53cba82e55
benchmark: add dotenv benchmark
...
PR-URL: https://github.com/nodejs/node/pull/54278
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2024-09-18 00:30:39 +00:00
Rafael Gonzaga
e4692eee75
benchmark: --no-warnings to avoid DEP/ExpWarn log
...
PR-URL: https://github.com/nodejs/node/pull/54928
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2024-09-15 16:57:10 +00:00
Chengzhong Wu
d64835f97e
node-api: add external buffer creation benchmark
...
Add a micro benchmark for external buffer creation.
PR-URL: https://github.com/nodejs/node/pull/54877
Refs: https://github.com/nodejs/node/issues/53804
Refs: https://github.com/nodejs/node/issues/44111
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-09-14 00:29:22 +00:00
Yagiz Nizipli
1d2603b53f
os: improve tmpdir performance
...
PR-URL: https://github.com/nodejs/node/pull/54709
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2024-09-11 14:46:30 +00:00
RafaelGSS
2f8d81ece3
benchmark: add buffer.isAscii benchmark
...
PR-URL: https://github.com/nodejs/node/pull/54740
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-09-06 17:46:49 +00:00
RafaelGSS
00291ea5dc
benchmark: add buffer.isUtf8 bench
...
PR-URL: https://github.com/nodejs/node/pull/54740
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-09-06 17:46:49 +00:00
Rafael Gonzaga
9441ce1c90
benchmark: add access async version to bench
...
PR-URL: https://github.com/nodejs/node/pull/54747
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2024-09-05 20:56:54 +00:00
Rafael Gonzaga
fff1549551
benchmark: enhance dc publish benchmark
...
PR-URL: https://github.com/nodejs/node/pull/54745
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2024-09-05 20:21:24 +00:00
RafaelGSS
248d5e0dac
benchmark: add match and doesNotMatch bench
...
PR-URL: https://github.com/nodejs/node/pull/54734
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-09-05 15:02:30 +00:00
RafaelGSS
b26238132b
benchmark: add rejects and doesNotReject bench
...
PR-URL: https://github.com/nodejs/node/pull/54734
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-09-05 15:02:29 +00:00
RafaelGSS
0b283c2b97
benchmark: add throws and doesNotThrow bench
...
PR-URL: https://github.com/nodejs/node/pull/54734
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-09-05 15:02:29 +00:00
RafaelGSS
688c885326
benchmark: add strictEqual and notStrictEqual bench
...
PR-URL: https://github.com/nodejs/node/pull/54734
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-09-05 15:02:28 +00:00
Rafael Gonzaga
80a989f931
lib: add util.getCallSite() API
...
PR-URL: https://github.com/nodejs/node/pull/54380
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Claudio Wunder <cwunder@gnome.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-04 19:47:25 +00:00
Rafael Gonzaga
a63882bece
benchmark,doc: add CPU scaling governor to perf
...
PR-URL: https://github.com/nodejs/node/pull/54723
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-09-04 19:21:18 +00:00
Rafael Gonzaga
133d2d9fad
benchmark,doc: mention bar.R to the list of scripts
...
PR-URL: https://github.com/nodejs/node/pull/54722
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-04 18:53:02 +00:00
Giovanni Bucci and Yaman Kassir
03fe00e3da
benchmark: adds groups to better separate benchmarks
...
Fixes: https://github.com/nodejs/node/issues/26425
Co-Authored-By: Yaman Kassir <mestery@protonmail.com >
PR-URL: https://github.com/nodejs/node/pull/54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-09-04 03:26:53 +00:00
Joyee Cheung
3b0617dd19
vm: migrate ContextifyScript to cppgc
...
This patch migrates ContextifyScript to cppgc-based memory
management using CppgcMixin.
PR-URL: https://github.com/nodejs/node/pull/52295
Refs: https://github.com/nodejs/node/issues/40786
Refs: https://docs.google.com/document/d/1ny2Qz_EsUnXGKJRGxoA-FXIE2xpLgaMAN6jD7eAkqFQ/edit
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-08-30 16:58:31 +00:00
Early Riser
43f699d4d2
benchmark: fix benchmark for file path and URL conversion
...
PR-URL: https://github.com/nodejs/node/pull/54190
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-08-25 13:41:13 +00:00