This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository terminology.
View the commit online.
commit 7c6b9c9e06e85aa532cbda6b5f57994b9d17ed0c
Author: Cedric BAIL <[email protected]>
AuthorDate: Fri Nov 20 12:27:42 2026 -0600
tybench: give each corpus a fresh terminal
The reset between corpora (RIS) keeps the link table of a terminal that
created a hyperlink, so every corpus run after one with an OSC 8 link
takes the slower paths that keep links counted. In pty-intake that is
every corpus after `hyperlink`. Run after a corpus holding a single
link, fill took 197% more cycles than on its own, insert 183%,
insert-mode 69%, scroll 54%, plain-ascii 27%, unicode 26%, long-lines
21%, scroll-region 20%, sgr 17% and rep 4%. That hides the cost of
changes to the intake path.
tytest_common_reset() gives a new terminal in place of the RIS. Each
corpus now costs the same after the link as on its own, within 0.5%.
Measured with perf stat -e cycles:u, tybench -i 5, one process per run
pinned to one CPU, the median of 7 interleaved runs.
---
src/bin/tybench.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bin/tybench.c b/src/bin/tybench.c
index e857e371..6e065a54 100644
--- a/src/bin/tybench.c
+++ b/src/bin/tybench.c
@@ -117,14 +117,14 @@ _feed_pass(const Corpus *c, int chunk)
}
}
-/* Put the terminal back to a known state between corpora, so one corpus cannot
- * leave modes set that change how the next one parses. */
+/* A new terminal for each corpus: one corpus must not leave anything that
+ * changes how the next one runs. RIS is not enough: a terminal that created
+ * a hyperlink keeps its link table, and with it the slower paths that keep
+ * the links counted. */
static void
_reset_terminal(void)
{
- static const char ris[] = "\033c";
-
- tytest_common_feed(ris, sizeof(ris) - 1);
+ tytest_common_reset();
}
static void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.