Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Match vs Split

No description provided

flattt

No description provided

flattern

No description provided

test he vs current

No description provided

Array.from() vs new Array() performance...

Testing the difference between creating filled arrays.

Observables: loops versus EventTarget vs extended event

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/

Regex or string javascript replace

No description provided

moment vs substring

No description provided

TikTok #1

No description provided

Test for tiktok

No description provided

Switch VS Object tiktok

No description provided

round to multiple of

No description provided

Number vs + vs parseFloat 235

No description provided

Number vs + vs parseFloat 234

No description provided

Number vs + vs parseFloat 23

No description provided

event listeners window vs input via 10 inputs

No description provided

event listeners window vs input/element via 1 element

trigger an event listener on 1 input: - on input: 10, 100 + 1k times - on window: 10, 100 + 1k times

test xml extract

No description provided

Reduce vs map with Object.assign 1

No description provided

Array vs Set inclusion - 4

No description provided

JS if statement perf

Benchmark of the speed difference between using multiple IF statements and an open-ended IF/ELSE IF.

Boolean constructor vs in Equality check in javascript

var bFalse = false; var sEmpty = ''; var sFilled = 'Foo'; var nZero = 0; var nOne = 1;

my Benchmark

No description provided

rev test2

No description provided

For, forEach, for of, Map

No description provided