summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-09-27 23:42:32 -0700
committerYuan Fu <casouri@gmail.com>2023-09-27 23:42:32 -0700
commit5ad8db88df8e80e2e00dfb16fa592c793735ff61 (patch)
treeb06bec6f9e0606a4bf10cfe8d053aae983afe437 /admin
parente881a172d483551ab546a4586beaa3d54ee0e148 (diff)
downloademacs-5ad8db88df8e80e2e00dfb16fa592c793735ff61.tar.gz
; * admin/notes/tree-sitter/performance (Experiments): Update.
Diffstat (limited to 'admin')
-rw-r--r--admin/notes/tree-sitter/performance10
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
parsing. Fortunately, changing ranges doesn’t invalidate incremental
parsing, so there isn’t 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.