Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Func vs new Func vs eval
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/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
func
27018436.0 Ops/sec
new func
26868774.0 Ops/sec
eval
7082466.0 Ops/sec
vanilla func
26758142.0 Ops/sec
vanilla constructor
26876500.0 Ops/sec
arrow
27178828.0 Ops/sec
Script Preparation code:
var func = Function("return 2 * 3"); var newFunc = new Function("return 3 * 2"); var fn = function(){return 3 * 7}; function Func(){ this.ret = ()=> 7 * 3 }; var fnObjInit = new Func(); var arrow = ()=> 8*2;
Tests:
func
func();
new func
newFunc()
eval
eval("4 * 1")
vanilla func
fn()
vanilla constructor
fnObjInit.ret()
arrow
arrow()