Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Closure vs arrow function
(version: 1)
Comparing performance of:
Closure vs Arrow function
Created:
9 years ago
by:
Registered User
Jump to the latest result
Tests:
Closure
var msg = "test"; var say = function() { console.log(msg); } say();
Arrow function
this.msg = "test"; var say = () => { console.log(this.msg); } say();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Closure
Arrow function
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Browser/OS:
Chrome 129 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Closure
440880.8 Ops/sec
Arrow function
437533.2 Ops/sec
Related benchmarks:
Arrow function vs closure function
Arrow function vs normal function
Arrow function vs Bind function - forked
Noop vs new arrow function calls
Arrow function vs function comparison
Comments
Confirm delete:
Do you really want to delete benchmark?