]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(runtime-core): use bit operations instead (#4142)
authorleno <39647285+leno23@users.noreply.github.com>
Mon, 19 Jul 2021 14:32:14 +0000 (22:32 +0800)
committerGitHub <noreply@github.com>
Mon, 19 Jul 2021 14:32:14 +0000 (10:32 -0400)
packages/runtime-core/src/renderer.ts

index 7cf9abc9cc3d0f5dac332be2f7d2dea09c66bba3..a750bceba9787fb40a1a6593088d7acade065d41 100644 (file)
@@ -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 {