Commit Graph

11 Commits

Author SHA1 Message Date
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
Joyee Cheung
9f6dbfedd1 benchmark: add require-esm benchmark
PR-URL: https://github.com/nodejs/node/pull/52166
Refs: https://github.com/nodejs/node/issues/52134
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-07-11 18:59:30 +00:00
Joyee Cheung
4e23d6904c
benchmark: rewrite import.meta benchmark
This is a ESM benchmark, rewrite it so that we are directly
benchmarking the ESM import.meta paths and using number of
loads for op/s calculation, instead of doing it in startup
benchmarks and nesting number of process/workers spawn
for op/s calculation.

PR-URL: https://github.com/nodejs/node/pull/50683
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-18 00:46:42 +00:00
Geoffrey Booth
02926d3c6a
esm: detect ESM syntax in ambiguous JavaScript
PR-URL: https://github.com/nodejs/node/pull/50096
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2023-10-20 15:44:56 +00:00
Livia Medeiros
fcf5de008a
benchmark: use tmpdir.resolve()
PR-URL: https://github.com/nodejs/node/pull/49137
Refs: https://github.com/nodejs/node/pull/49079
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-08-30 09:55:20 +00:00
Livia Medeiros
eeddbfae6c
test,benchmark: use tmpdir.fileURL()
PR-URL: https://github.com/nodejs/node/pull/49138
Refs: https://github.com/nodejs/node/pull/49040
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-21 16:42:03 +00:00
Antoine du Hamel
053511f7ec
module: ensure successful import returns the same result
PR-URL: https://github.com/nodejs/node/pull/46662
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-07-26 20:34:20 +00:00
Vinicius Lourenço
a2a8e31cbc
src,lib: reducing C++ calls of esm legacy main resolve
Instead of many C++ calls, now we make only one C++ call
to return a enum number that represents the selected state.

PR-URL: https://github.com/nodejs/node/pull/48325
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-07-03 18:42:47 +00:00
Antoine du Hamel
4afb25ccfd
benchmark: add a benchmark for defaultResolve
PR-URL: https://github.com/nodejs/node/pull/47543
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-04-13 19:49:54 +00:00
Antoine du Hamel
ca5f322d32
benchmark: add trailing commas
PR-URL: https://github.com/nodejs/node/pull/46370
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-29 19:13:35 +01:00
Guy Bedford
f3ce2811dd module: use Wasm CJS lexer when available
PR-URL: https://github.com/nodejs/node/pull/35583
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
2020-10-12 04:24:41 -07:00