Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Dispatching events vs array manipulation
(version: 0)
Comparing performance of:
dispatch vs array stuff
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
window.a1 = [] window.a2 = [] window.target = new EventTarget()
Tests:
dispatch
for (let i=0; i<17; i++) { window.target.dispatchEvent(new CustomEvent("clickme")) }
array stuff
window.a1.push(123) window.a2.push(123, 123, 123, 123) window.a1.push(...a2.splice(1, 2))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
dispatch
array stuff
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
JavaScript spread operator vs Object.assign performance with {} target obj
JavaScript spread operator vs Object.assign performance - Kien
JavaScript spread operator vs Object.assign performance with new object in assign and helper function - sorry didnt validate
v2 JavaScript spread operator vs Object.assign performance
JavaScript spread operator vs Object.assign performance reassign same variable 2
Comments
Confirm delete:
Do you really want to delete benchmark?