Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

RFDC clone vs Lodash cloneDeep vs JSON Clone vs Clone

No description provided

.includes() vs indexOf() for single-character search in string

No description provided

Lodash cloneDeep vs structuredClone w/ larger payload

https://developer.mozilla.org/en-US/docs/Web/API/structuredClone

Array.prototype.concat vs spread operator (2 separate arrays of same type)

Compare the ES6 spread operator with the traditional concat() method

Array.prototype.concat vs spread operator (2 separate arrays)

Compare the ES6 spread operator with the traditional concat() method

Javascript: Case insensitive string comparison performance inc. regex

No description provided

textContent vs nodeValue vs data vs innerHTML vs append vs dataWithCheck

No description provided

textContent vs nodeValue vs data vs innerHTML vs append

No description provided

textContent vs nodeValue vs data vs innerHTML

No description provided

textContent vs nodeValue vs data vs inner html

No description provided

z-indexes collection and coercion

No description provided

set node value

No description provided

deeply nested Lodash.get vs Lodash.property vs native

No description provided

parseInt vs Number mult

No description provided

Boolean vs double bang !!

No description provided

document.createElement() vs. document.createDocumentFragment()

No description provided

For-I vs For-of vs Reduce: Find the largest value in an array

A few of these cases are mostly to figure out how some changes impact optimisation. At the time of writing, each new test is based on the previous fastest test. So failed ideas don't reappear.

Javascript: reduce VS for with Math.max

Compare the "reduce" method with "for" iteration and "for-of" iteration. We try to find the maximum value in a list of number. I also added Math.max with the spread operator.

Math.pow(x,0.5) vs Math.sqrt(x) 2

No description provided

const vs let vs var asd

No description provided

reduce+concat vs. for loops

No description provided

getAttribute vs dataset 1002

Compare setAttribute to dataset

replace vs replaceAll (native)

No description provided

Array.toSpliced vs Array.filter

Test a speed difference between these 2 approaches

[0] vs .shift() with empty array

No description provided

NEW BENCHMARK Your Benchmarks