Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

js mapping: foreach vs for vs map

No description provided

undefined vs. hasOwnProperty2

Object lookup performance

undefined vs. hasOwnProperty

Object lookup performance

match vs exec

r

Array.prototype.concat vs spread operator 2

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

for (cached length) vs foreach vs some

Compare loop performance

clone vs cloneNode

No description provided

Delete property from object

Testing the performance of using `delete` keyword VS setting prop to null to remove an property of an object

Math.max/min vs if vs ternary operator

No description provided

Object.assign vs spread operator - no jquery

No description provided

forEach vs for loop

No description provided

Slice & Splice vs ES6 Array Spread

No description provided

conact vs push

No description provided

Dataview vs Uint8Array - read byte

No description provided

My Test2

No description provided

Id vs QuerySelector

No description provided

JavaScript spread operator vs Object.assign performance vs access

test

Batch your DOM changes, especially when updating styles

https://www.linkedin.com/pulse/25-techniques-javascript-performance-optimization-steven-de-salas When making calls to modify DOM make sure you batch them up so as to avoid repeated screen rendering, for example when applying styling changes. The ideal approach here is to make many styling changes in one go by adding or removing a class, rather than apply each individual style separately. This is because every DOM change prompts the browser to re-render the whole UI using the boxing model. If you need to move an item across the page using X+Y coordinates, make sure that these two are applied at the same time rather than separately.

My Test

No description provided

Compute factorial of a number in JavaScript

Iterative and recursive versions Implementations borrowed from https://medium.freecodecamp.org/how-to-factorialize-a-number-in-javascript-9263c89a4b38

Spread operator vs Array.push vs array[lastIndex]

No description provided

querySelector vs getElementsByClassName v3

No description provided

Multiply speed test 3

No description provided

document.head vs document.getElementsByTagName

No description provided

document.head vs document.getElementsByTagName("head")[0] fork123456

No description provided