Explorar o código

improve adler32 perf (#56)

evan %!s(int64=4) %!d(string=hai) anos
pai
achega
efb95c151e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/index.ts

+ 1 - 1
src/index.ts

@@ -703,7 +703,7 @@ const adler = (): CRCV => {
     p(d) {
       // closures have awful performance
       let n = a, m = b;
-      const l = d.length;
+      const l = d.length | 0;
       for (let i = 0; i != l;) {
         const e = Math.min(i + 2655, l);
         for (; i < e; ++i) m += n += d[i];