Latest Benchmarks

Browse the latest JavaScript performance benchmarks created by the community.

Comb Sort vs. Native Sort

No description provided

Prototype

No description provided

Prototype

No description provided

jQuery vs JS Testing

No description provided

jQuery by id vs Document.getElementById

Comparing speed of getting element by id with jQuery vs Vanilla JS

123456

No description provided

Shorthand set/getAttribute vs native

No description provided

className vs. setAttribute vs. classList

No description provided

Push vs. Concat

No description provided

True vs bitfield

No description provided

True vs bitfield

No description provided

Teste array concat

Testando perfoamnce de array concat e push

Teste array concat

Testando perfoamnce de array concat e push

Teste array concat

Testando perfoamnce de array concat e push

teste de fors

Teste de foreach jquery e nativo

teste de fors

Teste de foreach jquery e nativo

teste de fors

Teste de foreach jquery e nativo

splicevsfilter

No description provided

innerhtml vs removechild

No description provided

javascript join

No description provided

Observables: loops versus EventTarget (3 listeners)

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/

Observables: loops 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/

innerHTML vs removeChild

No description provided

Array .push() vs .unshift()

No description provided

Array .push() vs .unshift()

No description provided