Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

cloneNode perf

Faster way to create new dom elements before insertion

.includes() vs .test() vs .match() vs .indexOf()

Compare different intra-string matching styles

Optional chaining vs Lodash.get

No description provided

querySelector vs. getElementsByClassName nested dom

Testing querySelector against getElementsByClassName in a larger DOM with multiple target nodes (only one is needed)

Array loop vs foreach vs map with large array

No description provided

Lodash takeRight vs slice correct

No description provided

Lodash takeRight vs slice

No description provided

JSON.parse vs string.split small fixed array

No description provided

JSON.parse vs string.split small array

No description provided

Array IndexOf vs includes

No description provided

lodash sorting vs JS sort

No description provided

parse list of bytes

No description provided

Uint8Array vs Uint32Array

No description provided

React Hooks vs. Inline, useMemo, memo

No description provided

flatMap() vs filter().map() vs reduce() v4

flatMap vs filter map vs reduce()

multiple selectors vs multiple matches

Is it faster to check if a full selector matches an element or if individual selectors match? One matching selector is FASTER than many by a factor of x3 (which only gets worse as more selectors are searched, > 1000 is like x7) HOWEVER, if you need to determine WHICH selectors match, that requires you to do the individual search, at which point your search is actually a quarter worse than just doing the individual search at the start. nullifying much of the savings. If a match will be RARE, it could make sense to do the full string. however, if a match is common, I'd just stick with the individual matching from the start.

Math.random vs crypto.getRandom Alberto

No description provided

Canvas clearing performance v3

https://stackoverflow.com/questions/2142535/how-to-clear-the-canvas-for-redrawing

Compare lodash isEmpty and length comparison on arrays, stings and custom function isEmpty

No description provided

new Date from UNIX timestamp vs ISO string

No description provided

Add rows to Table: insertRow() vs insertAdjacentHTML

Vannilla JS version, no jquery

sumOfEventNumbers-vanilla-vs-rxjs-7

No description provided

concatenation vs template literal

No description provided

Add rows to Table: insertRow() vs appending innerHTML vs insertAdjacentHTML

Vannilla JS version, no jquery

Dynamic Create of Table: insertRow() vs appending HTML

Vannilla JS version, no jquery

NEW BENCHMARK Your Benchmarks