Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

regex replace vs replaceAll vs replace in loop V1.1

replace all whitespaces from string. what is faster? replace() with regex with global flag or without global flag and using a loop?

Item getting in typed array vs simple array

No description provided

change Float64Array vs array.push (change)

No description provided

Less than or equal to vs less than

Less than or equal to versus less than

Slice vs Splice vs Shift

Compares the speed for removing 2 items from the beginning of an array

Ramda vs Lodash sortBy

No description provided

Ramda vs Lodash vs Native findIndex

No description provided

constructor comparison vs. instanceof vs Array.isArray 2

Compares the performance of comparing a constructor strictly to a function object, using the instanceof operator and calling Array.isArray

JS Regex vs .startsWith vs .indexOf vs endsWith vs charAt

fork of https://www.measurethat.net/Benchmarks/Show/975/11/regex-vs-indexof-vs-startswith-vs-substr

Sanitize-html vs DOMpurify

No description provided

JS Array.from vs Spread [...]

No description provided

Array.prototype.sort (objects vs integers)

Comparing sort on date property inside object vs sort array of integers

intersect by create && set.has vs. array.includes

No description provided

Object values: Object.entries VS Object.keys VS Object.keys with extra array VS Object.entries without array VS for .. of

No description provided

Float string optimization: parseFloat() vs regex, full version

To get a cleaned-up float number with a limited number of digits of precision, which is faster: parsefloat() or a regular expression?

set vs array

No description provided

localStorage.getItem

No description provided

Can JavaScript benefit from the ECS pattern?

JS arrays are weird and (probably?) not memory-contiguous, but just for kicks, let's see what difference there is (if any) between performing the same action on 1,000,000 objects in an object-oriented style (with the method attached to the object) vs an ECS-style (with the behavior separated from the raw data)

Performance Test: substring vs substr vs slice vs split

No description provided

Reflect.set vs Object.assign vs Direct assignment

No description provided

Reduce Push vs. flatMap

No description provided

In operator vs Object Accessors

No description provided

setFont measureText OffscreenCanvas vs Canvas

DomCanvas vs OffscreenCanvas

OffscreenCanvas measureText

DomCanvas vs OffscreenCanvas

The grand dictionary property accessor schema

Objects: - porperty accessors - scope accessors

NEW BENCHMARK Your Benchmarks