]> git.wincent.com - hextrapolate.git/commitdiff
Some more probably immeasurable microoptimization
authorGreg Hurrell <greg@hurrell.net>
Fri, 2 Jun 2017 15:40:00 +0000 (08:40 -0700)
committerGreg Hurrell <greg@hurrell.net>
Fri, 2 Jun 2017 15:40:00 +0000 (08:40 -0700)
src/multiplyDigits.js

index fd662028df1b6040a14b3dd0be8925555ae700a7..8142c78ef541202dabc4f8a4a623b55cc86352b9 100644 (file)
@@ -39,7 +39,7 @@ export default function multiplyDigits(
       memoIndex++;
     } else if (memoIndex >= 0) {
       // We can use a previous result from the stack to leap ahead.
-      while (memoIndex >= 0) {
+      while (true) {
         const previous = memo[memoIndex--];
         if (previous.count <= multiplier) {
           result = addDigits(result, previous.result, base);