Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
eval vs function object vs function
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Browser:
Firefox 127
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
funcObj
2006.3M/s
func
1907.8M/s
eval
3.7M/s
View exact numbers
Test name
Executions per second
✓
funcObj
2,006,276,352 Ops/sec
func
1,907,755,392 Ops/sec
eval
3,689,849 Ops/sec
Script Preparation code:
var funcObj = new Function("return 2 * 3"); var func = ()=> {return 2*3};
Tests:
eval
eval("2 * 3");
funcObj
funcObj();
func
func();