Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

destru vs for

destru vs for

spread vs array.from on Map sorted

No description provided

JavaScript spread operator vs Slice/Splice performance, passing

No description provided

foreach vs map - creating new based on

----

array tests

lol

Array concat vs spread operator vs push vs spread spread

Compare the new ES6 spread operator with the traditional concat() method and push

indexOf vs startsWith

No description provided

Array.reduce vs for loop vs Array.forEach vs for of loop adsadsadsa

A test summing 1000 random numbers, 1 - 10000

Testing replace vs update of images

No description provided

Math.max() vs Array.reduce.apply()

Compare speed of Math.max() vs Array.reduce().

Array.concat vs Array.push vs Array.push spread

No description provided

eval vs string

No description provided

17112020002

17112020022desc

Observables: loops versus EventTarget2

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/

JS Regex vs .startsWith vs .indexOf vs. slice equals

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

lodash set vs manual object comparison

a

split substring replace

Compares slice, substr and substring to each other when there is only a start index

pow 0.5 vs sqrt

pow 0.5 vs sqrt

lodash merge vs object.assign vs spread - fixed

No description provided

Regex removing single whitespace vs multiple whitespaces

testing removing all whitespaces whether by matching one space or multiple space at a time

Some vs Find II

No description provided

Function arguments list vs object

No description provided

Compare direct v funx2

No description provided

Compare direct v funx

No description provided

Array vs Linked List (push, shift)

Manage Todos in a list - compare performance of Array vs Linked List.