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 (Linux; Android 10; SAMSUNG SM-J810G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/16.0 Chrome/92.0.4515.166 Mobile Safari/537.36
Browser:
Chrome Mobile 92
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
func
954304.2 Ops/sec
new func
968712.6 Ops/sec
eval
231337.5 Ops/sec
vanilla func
955096.0 Ops/sec
vanilla constructor
949741.2 Ops/sec
arrow
972000.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()