Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Eval vs Function - GOSSTEST
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0
Browser:
Chrome 149
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
12 days ago
Test name
Executions per second
eval(`(${theFunc})(3, 4)`)
0.0 Ops/sec
Function
6140421.5 Ops/sec
Script Preparation code:
var theFunc = "function(a,b) { return a + b }"
Tests:
eval(`(${theFunc})(3, 4)`)
eval(`${theFunc}()`)
Function
new Function(`return ${theFunc}`)()(3,4)