Closed mbostock closed 2 years ago
Fixes #97. Supersedes #89. No change in behavior; just a new implementation that uses a tokenizer and a positive lookahead to mimic an atomic group.
Demo: https://observablehq.com/d/ae672b8cd8dacfab
On my computer, the input with 200,000 repeating ones took 57 seconds with the current version of d3-color, and <1ms with this new approach.
Superseded by #100. (This implementation is fine, too, but I think I’d prefer to minimize churn with the other approach.)
Fixes #97. Supersedes #89. No change in behavior; just a new implementation that uses a tokenizer and a positive lookahead to mimic an atomic group.
Demo: https://observablehq.com/d/ae672b8cd8dacfab
On my computer, the input with 200,000 repeating ones took 57 seconds with the current version of d3-color, and <1ms with this new approach.