clearTimeout undefined cost (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
clearTimeout undefined cost
const t = Math.random() > .5 ? undefined : setTimeout(()=>{}, 1000);
clearTimeout(t);
ready
clearTimeout undefined cost bail
const t = Math.random() > .5 ? undefined : setTimeout(()=>{}, 1000);
if (t) clearTimeout(t)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.