clearTimeout undefined cost

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
clearTimeout undefined cost
// attempt to prevent the optimizer from knowing t is certainly undefined
const t = Date.now() > 0 ? undefined : 'never';
clearTimeout(t);
ready
clearTimeout undefined cost bail
// attempt to prevent the optimizer from knowing t is certainly undefined
const t = Date.now() > 0 ? undefined : 'never';
if (t) clearTimeout(t)
ready

Revisions

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