Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
throttle vs math
(version: 1)
Comparing performance of:
throttle vs math
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here--> <script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js'></script>
Script Preparation code:
const scrollTop = 100; const scrollHeight = 100; const clientHeight = 400;
Tests:
throttle
[Async/Deferred]
const fn = () => (scrollTop / (scrollHeight - clientHeight)) * 100; let result = _.throttle(fn, 10);
math
[Async/Deferred]
const fn = () => (scrollTop / (scrollHeight - clientHeight)) * 100; let result = fn();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
throttle
math
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!
Comments
Confirm delete:
Do you really want to delete benchmark?