Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Anonymous Functions Evaluations (IIFE)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Outside of IIFE
4460289.0 Ops/sec
Inside of IIFE
1642909.6 Ops/sec
Tests:
Outside of IIFE
const arr = []; for(let i = 0; i < 100; i++) { let value; if(i % 10 === 0) value = 1; else value = 0; arr.push(value); }
Inside of IIFE
const arr = []; for(let i = 0; i < 100; i++) { arr.push((() => { if(i % 10 === 0) return 1; return 0; })()); }