Browse Source

chore(runtime-core): use bit operations instead (#4142)

leno 5 năm trước cách đây
mục cha
commit
84f6791e89
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/runtime-core/src/renderer.ts

+ 1 - 1
packages/runtime-core/src/renderer.ts

@@ -2485,7 +2485,7 @@ function getSequence(arr: number[]): number[] {
       u = 0
       v = result.length - 1
       while (u < v) {
-        c = ((u + v) / 2) | 0
+        c = (u + v) >> 1
         if (arr[result[c]] < arrI) {
           u = c + 1
         } else {