Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
setTimeout + clearTimeout
(version: 1)
Comparing performance of:
set and clear vs just set
Created:
7 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var i = 0;
Tests:
set and clear
const timeout = setTimeout(function(){i++}, 1000); clearTimeout(timeout)
just set
setTimeout(function(){i++}, 1000);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
set and clear
just set
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
Browser/OS:
Chrome 140 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
set and clear
2581652.0 Ops/sec
just set
1436530.9 Ops/sec
Related benchmarks:
setTimeout vs wrapped setTimeout
Multipromise resulter
await delay vs setTimeout
sdasdas
Date.now vs setTimeout
SetTimeout 0 vs nothing
function(){} and ()=>{}
Date.now 1000ms vs setTimeout 1000ms
test early return
Comments
Confirm delete:
Do you really want to delete benchmark?