Commit 9ef52d7
committed
perf(Math): Avoid Math.min, Math.max in vtkMath.arrayMin, vtkMath.arrayMax
Timings:
Existing Math.min: ~210ms for arrayMin, ~2712ms for entire volume rendering initialization
Comparison operator: ~35ms for arrayMin, ~2070ms for entire volume rendering initialization
Ternary operator: ~37ms for arrayMin, ~2125ms for entire volume rendering initialization1 parent 5c77a5a commit 9ef52d7
1 file changed
+8
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
| |||
0 commit comments