Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
new function vs eval vs regular functions
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/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Arrow function
4271899.5 Ops/sec
eval
2281753.5 Ops/sec
new function
1226249.0 Ops/sec
regular function
4335692.0 Ops/sec
Tests:
Arrow function
var arrowFunc = () => {let r = Math.random().toString(36).substring(7).includes('x');} arrowFunc();
eval
eval("let r = Math.random().toString(36).substring(7).includes('x');");
new function
var newFunc = new Function("let r = Math.random().toString(36).substring(7).includes('x');"); newFunc();
regular function
var regularFunc = function() {let r = Math.random().toString(36).substring(7).includes('x');} regularFunc();