rascal
rascal copied to clipboard
perf(backoff): optimize linear backoff using closure
Remove lodash dependency for faster property access Pre-calculate range in closure to avoid repeated subtraction on each call Add early return optimization for constant values (min === max) -Use modern JS features (default parameters, arrow functions)
The range calculation is moved from the hot path (next() function) to the closure scope, ensuring it's computed only once when the backoff function is created rather than on every invocation