Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

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

Compare loop performance

Modulo VS bitwise AND for finding odd number

No description provided

replaceall vs replace js

No description provided

Event Bubbling and Event Capturing

No description provided

Pack array of bitmasks (numbers)

No description provided

Object.Values + Map vs for-in push

No description provided

Can JavaScript benefit from the ECS pattern 2?

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)

String literal vs Template literal assignment

Is there a difference between constant string and a constant template literal assignment?

destructuring types

No description provided

Trimming leading/trailing characters (multiple)

No description provided

JSON.stringify vs structuredClone 2dsfasr12qe12321312331312321 2312312

JSON.stringify vs structuredClone 2dsfasr12qe12321312331312321

JSON.stringify vs structuredClone 2dsfasr12qe12321312331312321

JSON.stringify vs structuredClone 2dsfasr12qe12321312331312321

testing string

No description provided

JavaScript .sort() vs .toSorted ()vs [...].sort()

Compare Javascript sort performance

JavaScript reverse vs [,..spread].reverse

Compare Array.reverse() to Array.toReversed() performance wise.

Date methods: toISOString, getDay, constructor

No description provided

Slice vs Splice vs Shift (Large Array 2)

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

array join vs toString js vs json

test

RegEx.match vs. startWith2

a

RegEx.match vs. startWith

a

Access to Proxy vs Array

No description provided

Multiple .closest() or complex CSS selector

No description provided

Native JS: concatenate integer with string with + vs template literals vs String.concat

find best solution for concatenate 4 strings

putImageData vs drawImage manual v2

No description provided

putImageData vs drawImage manual

No description provided