Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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:
3 months ago
Benchmark engine:
Benchmark.js
Function
6.1M/s
eval(`(${theFunc})(3, 4)`)
0/s
View exact numbers
Test name
Executions per second
✓
Function
6,140,422 Ops/sec
eval(`(${theFunc})(3, 4)`)
0 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)