diff options
Diffstat (limited to 'testing/diff.ts')
-rw-r--r-- | testing/diff.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/testing/diff.ts b/testing/diff.ts index 4c96b3b28..dd544ac24 100644 --- a/testing/diff.ts +++ b/testing/diff.ts @@ -72,9 +72,14 @@ export default function diff<T>(A: T[], B: T[]): Array<DiffResult<T>> { const delta = M - N; const size = M + N + 1; const fp = new Array(size).fill({ y: -1 }); - // INFO: This buffer is used to save memory and improve performance. - // The first half is used to save route and last half is used to save diff type. - // This is because, when I kept new uint8array area to save type, performance worsened. + /** + * INFO: + * This buffer is used to save memory and improve performance. + * The first half is used to save route and last half is used to save diff + * type. + * This is because, when I kept new uint8array area to save type,performance + * worsened. + */ const routes = new Uint32Array((M * N + size + 1) * 2); const diffTypesPtrOffset = routes.length / 2; let ptr = 0; |