; * admin/notes/tree-sitter/performance (Experiments): Update.

This commit is contained in:
Yuan Fu 2023-09-27 23:42:32 -07:00
parent e881a172d4
commit 5ad8db88df
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -13,3 +13,13 @@ range, so you have to update the ranges every time before
parsing. Fortunately, changing ranges doesnt invalidate incremental
parsing, so there isnt any performance lost in update ranges
frequently.
* Experiments
Using regexp by default in treesit-simple-indent-rules seems wasteful,
so I tried replacing all string-match-p to equal in
treesit-simple-indent-presets, and indent xdisp.c for a comparison.
Turns out using regexp by default is faster: regexp-based indent took
45s and equal-based indent took 75s.
I could be missing something, further experiments are welcome.