mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:26:23 -04:00
We have to pay the cost of compiling the regex at runtime, and the `LazyLock` overhead for each access. The pattern is simple enough that we can manually parse and extract. `grammar_json_name` is now ~116x faster on cold start, ~5.6x faster warm (after the regex has been compiled). Both are fast enough to not matter much in practice, but some perf gains and eliminating global state is a win. |
||
|---|---|---|
| .. | ||
| cli | ||
| config | ||
| generate | ||
| highlight | ||
| language | ||
| loader | ||
| tags | ||
| xtask | ||