From 5ad8db88df8e80e2e00dfb16fa592c793735ff61 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Wed, 27 Sep 2023 23:42:32 -0700 Subject: [PATCH] ; * admin/notes/tree-sitter/performance (Experiments): Update. --- admin/notes/tree-sitter/performance | 10 ++++++++++ 1 file changed, 10 insertions(+) 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.