From 83bc0423b2d57430c88c0cf78b78b7caace5d12f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 26 Jul 2025 09:34:13 +0530 Subject: [PATCH] Micro optimisation Dont lookup char props for ascii char at start of draw command. Improves benchmark by 2-5% --- kitty/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/screen.c b/kitty/screen.c index c9bd6e08e..04d7612d2 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1111,7 +1111,7 @@ draw_text_loop(Screen *self, const uint32_t *chars, size_t num_chars, text_loop_ int char_width; for (size_t i = 0; i < num_chars; i++) { uint32_t ch = map_char(self, chars[i]); - if (ch < DEL && s->seg.grapheme_break == GBP_None) { // fast path for printable ASCII + if (ch < DEL && s->seg.grapheme_break <= GBP_None) { // fast path for printable ASCII if (ch < ' ') { draw_control_char(self, s, ch); continue;