diff options
| author | Yuan Fu | 2023-09-27 23:42:32 -0700 |
|---|---|---|
| committer | Yuan Fu | 2023-09-27 23:42:32 -0700 |
| commit | 5ad8db88df8e80e2e00dfb16fa592c793735ff61 (patch) | |
| tree | b06bec6f9e0606a4bf10cfe8d053aae983afe437 /admin | |
| parent | e881a172d483551ab546a4586beaa3d54ee0e148 (diff) | |
| download | emacs-5ad8db88df8e80e2e00dfb16fa592c793735ff61.tar.gz emacs-5ad8db88df8e80e2e00dfb16fa592c793735ff61.zip | |
; * admin/notes/tree-sitter/performance (Experiments): Update.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/notes/tree-sitter/performance | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/notes/tree-sitter/performance b/admin/notes/tree-sitter/performance index 315a550be34..23f84743ced 100644 --- a/admin/notes/tree-sitter/performance +++ b/admin/notes/tree-sitter/performance | |||
| @@ -13,3 +13,13 @@ range, so you have to update the ranges every time before | |||
| 13 | parsing. Fortunately, changing ranges doesn’t invalidate incremental | 13 | parsing. Fortunately, changing ranges doesn’t invalidate incremental |
| 14 | parsing, so there isn’t any performance lost in update ranges | 14 | parsing, so there isn’t any performance lost in update ranges |
| 15 | frequently. | 15 | frequently. |
| 16 | |||
| 17 | * Experiments | ||
| 18 | |||
| 19 | Using regexp by default in treesit-simple-indent-rules seems wasteful, | ||
| 20 | so I tried replacing all string-match-p to equal in | ||
| 21 | treesit-simple-indent-presets, and indent xdisp.c for a comparison. | ||
| 22 | Turns out using regexp by default is faster: regexp-based indent took | ||
| 23 | 45s and equal-based indent took 75s. | ||
| 24 | |||
| 25 | I could be missing something, further experiments are welcome. | ||