Subject: 29.0.60; Evaluating predicates before creating captured nodes in treesit-query-capture
From: Yuan Fu <[email-masked]>
To: Bug Report Emacs <[email-masked]>
Date: Tue, 21 Mar 2023 21:49:37 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

X-Debbugs-CC: [email-masked]

Dmitry, when you have time, could you try your benchmark in bug#60953
with this patch? I made predicates evaluate before we create any nodes,
so #equal and #match should be more efficient now, when there are a lot
of rejections. In the same time #pred is made slightly worst since they
now create a lisp node and discard it. (But this can be fixed with a
little more complexity.)

Yuan