Commit 21c1796
committed
perf(datashader): factorize instead of np.unique for hex alpha-strip
The per-point color vector alpha-strip used np.unique(return_inverse=True), which
sorts millions of strings (argsort dominated the datashader render: ~1s at 10M).
pd.factorize dedups in O(n) via hashing with no sort and produces a byte-identical
per-point result. Modest win for the no-color/categorical paths.1 parent cdaa0c2 commit 21c1796
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | | - | |
387 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
| |||
0 commit comments