Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
In objects: shorthand vs arrow vs normal
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Browser:
Firefox 137
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Shorthand
1326547968.0 Ops/sec
Arrow
1346728960.0 Ops/sec
Normal
1318435328.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
let val = 0 const obj = { getVal() { return val; }, setVal(x) { val = x; }, getValArrow: () => { return val; }, setValArrow: (x) => { val = x; }, getValFn: function() { return val }, setValFn: function(x) { val = x }, }
Tests:
Shorthand
obj.getVal() obj.setVal(1) obj.getVal()
Arrow
obj.getValArrow() obj.setValArrow(1) obj.getValArrow()
Normal
obj.getValFn() obj.setValFn(1) obj.getValFn()