anchor.diff:        }
         i -= d0;
       }
  -    if (div) {
  -      // Return quotient, i.e. r_digits[y_used..r_used-1] with proper sign.
  -      r_digits = _cloneDigits(r_digits, y_used, r_used, r_used - y_used);
  -      var r = new _Bigint(false, r_used - y_used, r_digits);
  -      if (_neg != a._neg && r._used > 0) {
  -        r = r._negate();
  -      }
  -      return r;
  -    }
  -    // Return remainder, i.e. denormalized r_digits[0..y_used-1] with
  -    // proper sign.
  -    r_digits = _cloneDigits(r_digits, 0, y_used, y_used);
  -    var r = new _Bigint(false, y_used, r_digits);
  -    if (nsh > 0) {
  -      r = r._rShift(nsh);  // Denormalize remainder.
  -    }
  -    if (_neg && r._used > 0) {
  -      r = r._negate();
  -    }
  -    return r;
  +    // Cache result.
  +    _lastDividend_digits = _digits;
  +    _lastDividend_used = _used;
  +    _lastDivisor_digits = a._digits;
  +    _lastDivisor_used = a._used;
  +    _lastQuoRem_digits = r_digits;
  +    _lastQuoRem_used = r_used;
  +    _lastRem_used = y_used;
  +    _lastRem_nsh = nsh;
     }
   
     // Customized version of _rem() minimizing allocations for use in reduction.
  
positive.code: 
    // Return trunc(this / a), a != 0.
    _Bigint _div(_Bigint a) {
      return _divRem(a, true);
    }
  
    // Return this - a * trunc(this / a), a != 0.
    _Bigint _rem(_Bigint a) {
      return _divRem(a, false);
    }
  
    // Return trunc(this / a), a != 0, if div == true.
    // Return this - a * trunc(this / a), a != 0, if div == false.
    _Bigint _divRem(_Bigint a, bool div) {
      assert(a._used > 0);
      if (_used < a._used) {
        return div ? _ZERO : this;
      }
      var nsh = _DIGIT_BITS - _nbits(a._digits[a._used - 1]);
      // For 64-bit processing, make sure y has an even number of digits.
  
negative.code:   static _Bigint _ZERO = new _Bigint._fromInt(0);
    static _Bigint _ONE = new _Bigint._fromInt(1);
  
    // Result cache for last _divRem call.
    static Uint32List _lastDividend_digits;
    static int _lastDividend_used;
    static Uint32List _lastDivisor_digits;
    static int _lastDivisor_used;
    static Uint32List _lastQuoRem_digits;
    static int _lastQuoRem_used;
    static int _lastRem_used;
    static int _lastRem_nsh;
  
    // Internal data structure.
    bool get _neg native "Bigint_getNeg";
    int get _used native "Bigint_getUsed";
  