• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / luma.gl / 23148246676

16 Mar 2026 02:16PM UTC coverage: 76.991% (+0.08%) from 76.914%
23148246676

push

github

web-flow
chore(webgpu): Optimize WebGPU per-frame CPU overhead (#2538)

2696 of 3484 branches covered (77.38%)

Branch coverage included in aggregate %.

229 of 285 new or added lines in 6 files covered. (80.35%)

3 existing lines in 1 file now uncovered.

30788 of 40007 relevant lines covered (76.96%)

99.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

56.6
/modules/core/src/utils/array-equal.ts
1
// luma.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import {isNumberArray} from './is-array';
1✔
6

1✔
7
const MAX_ELEMENTWISE_ARRAY_COMPARE_LENGTH = 128;
1✔
8

1✔
9
/** Test if two arrays are deep equal, with a small-array length limit that defaults to 16 */
1✔
10
export function arrayEqual(a: unknown, b: unknown, limit: number = 16) {
1✔
11
  if (a === b) {
76!
NEW
12
    return true;
×
13
  }
×
14

76✔
15
  const arrayA = a;
76✔
16
  const arrayB = b;
76✔
17
  if (!isNumberArray(arrayA) || !isNumberArray(arrayB)) {
76!
18
    return false;
76✔
19
  }
76!
NEW
20

×
NEW
21
  if (arrayA.length !== arrayB.length) {
×
22
    return false;
×
23
  }
×
NEW
24

×
NEW
25
  const maxCompareLength = Math.min(limit, MAX_ELEMENTWISE_ARRAY_COMPARE_LENGTH);
×
NEW
26
  if (arrayA.length > maxCompareLength) {
×
NEW
27
    return false;
×
NEW
28
  }
×
NEW
29

×
NEW
30
  for (let i = 0; i < arrayA.length; ++i) {
×
NEW
31
    if (arrayB[i] !== arrayA[i]) {
×
NEW
32
      return false;
×
33
    }
×
34
  }
×
NEW
35

×
36
  return true;
×
37
}
×
38

1✔
39
/** Copy a value */
1✔
40
export function arrayCopy<T>(a: T): T {
1✔
41
  if (isNumberArray(a)) {
76✔
42
    return a.slice() as T;
64✔
43
  }
64✔
44
  return a;
12✔
45
}
12✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc