Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Math.sqrt(x * x) vs Math.sqrt(x ** 2)

Math.sqrt(x * x) vs Math.sqrt(x ** 2)

querySelector v getElementById

No description provided

(x ** 0.5) vs Math.sqrt(x) (inverse order)

No description provided

parsing query param keys with string or regex

No description provided

JS includes vs StartWith vs substring + ==

No description provided

regexp with i option VS regexp with lowercase input

test it

Array.sort with strings vs arrays

No description provided

new Operator vs object literal

No description provided

2 getItems(): flatMap() vs map() and flat()

getItems() behavior from Mikro ORM: flatMap vs map and flat

getItems(): flatMap() vs map() and flat()

getItems() behavior from Mikro ORM: flatMap vs map and flat

Optional Chaining versus _.get lodash V22

No description provided

for vs foreach vs for..in vs for..of - add object property

Compare loop performance

interactionObserver vs Scroll Listener

No description provided

Web Components

No description provided

String case insensitve search: Regexp vs includes + toLowercase

No description provided

Sets equality comparison

No description provided

fromEntriesVSReduce

No description provided

forEach vs for of (without indexes)

No description provided

String() vs .toString() vs template string with oids

No description provided

String() vs .toString() vs template string withs strings

No description provided

String looping test v2

No description provided

Switch vs Object Literal vs If-Else

No description provided

React Hooks vs. Inline, useMemo, memo (React 18)

Comparing performance of: Inline Function vs Hooks vs Without useMemo vs With useMemo vs Child without memo vs Child with memo (React 18)

Lodash.isEqual vs JSON.stringify Equality Comparison for deep chart.

Test on isEqual performance

JavaScript Array Performance — for vs for...of vs for...in vs forEach vs reduce

Compare the performance of five ways to traverse an array and accumulate a computed numeric result. All test cases execute the same work on the same input data. Note that for...in enumerates property keys rather than using the array iterator, so its semantics differ from for, for...of, forEach, and reduce.