Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

for vs foreach vs for..in vs for..of

Compare loop performance

Arrow function vs bind function creation

No description provided

className vs. classList replace2

No description provided

className vs. classList replace

No description provided

remove element using splice slice vs spread slice

No description provided

getComputedStyle vs clientWidth

if one time get style. Better element.clientWidth if two - no difference if three ore more, Better getComputedStyle(element)

Array.prototype.slice vs spread operator long 3

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

Array.prototype.slice vs spread operator long with push

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

Push element using Array.prototype.slice vs spread operator

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

Testing Here

Testing Here

DataAttribute vs Class Selector vs ID Selector vs Custom Attributes

No description provided

classList.contains vs. Set vs regex

No description provided

hasOwn vs hasOwnProperty vs typeof

Object lookup performance

Case insensitive string comparison performance

No description provided

replacer string vs function 2

No description provided

DOM modification getElementById pre-buffered vs direct /w counter

No description provided

DOM modification getElementById pre-buffered vs direct

No description provided

getElementById pre-buffered vs direct

No description provided

buffered getElementById vs non-buffered

No description provided

class vs id test 3

No description provided

class vs id test

No description provided

Option chaining and typeof 2

No description provided

Option chaining and typeof

No description provided

lodash merge vs object.assign vs spread 22222

No description provided

replace vs substring vs slice from END

Test the performance of replace() vs substring() vs slice() when replacing a char at the beginning of a (in this case uri query-)string that may or may not be there. Added the combined brackets[ ] + substr() method, since it's always the first char we wan't to pop off. Inspired by https://jsperf.com/replace-or-substr. Note: could not get 'let' and 'const' to work. Well, too bad...