Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test early return
(version: 1)
Comparing performance of:
actual vs future
Created:
one year ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
actual
(function() { var loadTimeout = 5000; var loadFired = false; var timeoutFallback; function onWindowLoad() { if (!loadFired) { loadFired = true; clearTimeout(timeoutFallback); window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'window_load' }); } } function fallback() { if (!loadFired) { loadFired = true; window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'load_fallback' }); } } window.addEventListener('load', onWindowLoad); timeoutFallback = setTimeout(fallback, loadTimeout); })();
future
(function() { var loadTimeout = 5000; var loadFired = false; var timeoutFallback; function onWindowLoad() { if (loadFired) { return; } loadFired = true; clearTimeout(timeoutFallback); window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'window_load' }); } function fallback() { if (loadFired) { return; } loadFired = true; window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'load_fallback' }); } window.addEventListener('load', onWindowLoad); timeoutFallback = setTimeout(fallback, loadTimeout); })();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
actual
future
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/133.0.6943.84 Mobile/15E148 Safari/604.1
Browser/OS:
Chrome Mobile iOS 133 on iOS 18.2.1
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
actual
3522.6 Ops/sec
future
0.5 Ops/sec
Related benchmarks:
Benchmark GTM
Test array concat
Luxon vs
Counter Increasement v4
undefined to boolean
js mul vs pow
Hihihihi
Splti vs Trim vs replace className
testingqueries
Comments
Confirm delete:
Do you really want to delete benchmark?