Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

testing the performance of try catch vs check for undefined

No description provided

object assign vs object spread vs immutable-js vs immutability-helper on large data set

No description provided

className vs. setAttribute vs. classList with removal

No description provided

Comparação entre createElement vs string template

Comparação entre createElement vs string template

lodash assign vs object.assign vs spread

No description provided

Object.assign vs mutation assign

No description provided

InnerHTML vs deleteRow

Testing to see what is the fastest way to clear a table.

_.includes vs includes()

No description provided

_.merge vs Object.assign

No description provided

Array filter vs. for loop and for in

This version declares i once before

Find Benchmark Test

find

Underscore and Lodash: isEqual v2

No description provided

match vs exec

r

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

forEach vs for loop

No description provided

Slice & Splice vs ES6 Array Spread

No description provided

Dataview vs Uint8Array - read byte

No description provided

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.

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

document.head vs document.getElementsByTagName

No description provided

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

No description provided

NEW BENCHMARK Your Benchmarks