]> Piment Noir Git Repositories - benchmarks-js.git/commit
feat(bench): add common JS pattern benchmarks
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 10 Feb 2026 22:13:06 +0000 (23:13 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 10 Feb 2026 22:13:06 +0000 (23:13 +0100)
commita49b53752d9fa8bc4a1daa7288e873a0ff7e6c0b
tree6b357cbed0cb02d914767763f208e463ee3cfcd7
parentcdc85f4d4a8fc95760a07d811367b19d5e9e90d4
feat(bench): add common JS pattern benchmarks

Add 9 new benchmark files for frequently used JS patterns:
- array-iteration: for loop vs for...of vs forEach vs reduce
- string-concatenation: + vs template literal vs concat vs join
- type-checking: typeof vs instanceof vs Array.isArray vs toString
- array-filter: filter() vs for loop vs reduce
- array-find: find() vs findIndex() vs some() vs for loop
- set-vs-array-lookup: Set.has() vs includes() vs indexOf()
- object-iteration: for...in vs Object.keys/values/entries
- number-parsing: parseInt vs Number vs unary + vs bitwise ops
- property-check: in vs hasOwnProperty vs Object.hasOwn vs Reflect.has
array-filter.mjs [new file with mode: 0644]
array-find.mjs [new file with mode: 0644]
array-iteration.mjs [new file with mode: 0644]
number-parsing.mjs [new file with mode: 0644]
object-iteration.mjs [new file with mode: 0644]
property-check.mjs [new file with mode: 0644]
set-vs-array-lookup.mjs [new file with mode: 0644]
string-concatenation.mjs [new file with mode: 0644]
type-checking.mjs [new file with mode: 0644]