Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

lodash vs map 5

No description provided

__proto__ vs getPrototypeOf

No description provided

Number#toLocaleString () vs Intl.NumberFormat#format()

No description provided

flatMap() vs filter().map() 1asdasd

flatMap vs filter map

property access: object with define property vs Proxy get vs plain object vs methods

No description provided

Filter-Map: Lodash vs Native v3

No description provided

lodash flatMap() vs lodash filter().map()

lodash flatMap vs lodash filter map

getFloatFrequencyData vs getByteFrequencyData

No description provided

createElement vs cloneNode vs innerHTML vs innerHTML(single innerHTML)

Faster way to create new dom elements before insertion

setAttribute(...) vs. classList.add(...) vs classList.value vs className (multiple classes, no override)

Same as https://www.measurethat.net/Benchmarks/Show/27015/0/setattribute-vs-classlistadd-vs-classlistvalue-vs-class but without override, getter chosen based on https://www.measurethat.net/Benchmarks/Show/27014/0/getattribute-vs-classlistvalue-vs-classname

JavaScript spread operator vs Object.assign performance reassign same variable 2

No description provided

property access: object with define property vs Proxy get vs plain object 2

No description provided

property access: object with define property vs Proxy get vs plain object

No description provided

property access: object with define property vs Proxy get

No description provided

Array: [] vs at()

No description provided

Observables: loops with try/catch versus EventTarget

When the “observable” pattern is implemented in JavaScript, it's practically always done using a loop over callbacks. One problem with this approach is that an exception in one handler will crash the entire loop. You can work around this by wrapping the invocation in a try/catch block, but in doing so, you silently swallow the error. The browser provides an event dispatcher for DOM elements that runs each handler in a separate execution context, providing a better failure mode for independent listeners. `EventTarget` is an interface, so you can't directly instantiate one. But you can hijack the `EventTarget` implementation from a dummy object. This test compares multi-listener dispatches using loops and the built-in `EventTarget`. My expectation is that the native mechanism will carry some overhead, partly because of the bespoke execution context, and partly because of the extra properties instantiated on each `CustomEvent` instance. This method also has to look up events by their (string) names, rather than using direct object reference. See http://dean.edwards.name/weblog/2009/03/callbacks-vs-events/

Array combination by destructuring vs concat()

Test how a couple of succesive object array concatenations perform.

JS Proxy vs Getter - Actual

No description provided

JS Proxy vs Getter

No description provided

innerHTML vs replaceChildren to empty an element

No description provided

Map -> Array

No description provided

Intl.NumberFormat vs Intl.NumberFormat-memo

No description provided

function vs Class_

No description provided

lz-string vs lz-utf8

emulate file compression/decompression

fflate vs lz-string vs shorty

emulate file compression/decompression

NEW BENCHMARK Your Benchmarks