Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Event Handler Inline Anonymous vs Named
(version: 0)
Comparing performance of:
Inline Anonymous vs Named Function
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/16.3.0/cjs/react.production.min.js'></script> <button id="button1" on-click={(e) => console.log(e)}>Test</button> <button id="button2" on-click={logFunction}>Test</button>
Script Preparation code:
const logFunction = (e) => console.log(e);
Tests:
Inline Anonymous
document.getElementById('button1').click();
Named Function
document.getElementById('button2').click();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Inline Anonymous
Named Function
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
React Hooks vs. Inline (React 16.14.0)
React useCallback hook vs inline function
React useCallback hook vs inline function with state react 17
React useCallback vs inline function vs inline handler
Comments
Confirm delete:
Do you really want to delete benchmark?