Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

reverse & map VS for-loop

No description provided

Testing123

testing123

createElement vs Jquery detailed

Faster way to create new dom elements before insertion

Object.keys().length vs for i in object i++ vs Object.entries().length vs Object.values().length

No description provided

for i < length vs .forEach(t) vs for..of vs for t = keys[i] vs for i =0; i in keys vs for i in object vs .reduce (keys only)

Compare loop performance

for ++i < length vs .forEach(t) vs for..of vs for t = entries[++i] vs for i = 0; ++i in entries vs for ++i in object vs .reduce (entries)

Compare loop performance

for i < length vs .forEach(t) vs for..of vs for t = array[i] vs for i = 0; i in array vs for i in array vs .reduce (Array)

Compare loop performance

alpha-numeric string

Check if a string contains only alpha-numeric characters.

testquery

No description provided

Alphanumeric String

Check if a string only contains alpha-numeric characters.

Alphanumeric

The best approach to check if a string is alphanumeric (JavaScript)

createElement vs JQuery $

Faster way to create new dom elements before insertion

Compare null undefined speed

No description provided

Updating table as whole vs Updating particular cell

No description provided

Vanilla JS VS JQuery DOM perfomance + getbyid(elId)

Vanilla JS VS JQuery DOM perfomance

document querySelectorAll vs. Element querySelectorAll

scoped and unscoped querySelector

nodes vs attributes vs nodeValue string for WRITE DOM data storage benchmark

Result: Using nodes and nodeValue as data storage over attributes can be 2-4X faster for writing if stored as formatted string or using positions. Still 5-10X slower than JS objects.

nodes vs attributes vs nodeValue string for READING DOM data storage benchmark

No description provided

Null vs undefined

No description provided

Lodash sort vs array.prototype.sort string

No description provided

DOM set attributes of children vs JS Array WRITE performance v2

Result: JS Array is 4X faster than setting DOM attributes, but setting DOM nodeValue is still fastest getAttributeNode().value seems to be fastest way of setting an attribute

DOM set attributes of children vs JS Array WRITE performance

Result: JS Array is 4X faster than setting DOM attributes, but setting DOM nodeValue is still fastest

DOM get attributes of children vs JS Array READ performance v2

Results: Reading the DOM with nextElementSibling + getAttribute is less than 5% slower than an JS array list. textContent is slightly faster than a JS array list, and nodeValue is 3X faster.

DOM get attributes of children vs JS Array READ performance

Results: Reading the DOM with nextElementSibling + getAttribute is less than 5% slower than an JS array list

Inline function vs separately declared function

Test