benchmark: focus on import.meta intialization in import-meta benchmark · nodejs/node@e8930e9 · GitHub
Skip to content

Commit e8930e9

Browse files
joyeecheungaduh95
authored andcommitted
benchmark: focus on import.meta intialization in import-meta benchmark
Instead of measuring the performance of the entire module initialization, focus only on the import.meta initialization. PR-URL: #60603 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
1 parent b20d9c2 commit e8930e9

5 files changed

Lines changed: 32 additions & 16 deletions

File tree

benchmark/esm/import-meta.js

Lines changed: 28 additions & 12 deletions
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export const dirname = import.meta.dirname;
2-
export const filename = import.meta.filename;
1+
export default () => [ import.meta.dirname, import.meta.filename ];
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const dirname = import.meta.dirname;
1+
export default () => import.meta.dirname;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const filename = import.meta.filename;
1+
export default () => import.meta.filename;
Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)