aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-15 06:44:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-24 15:30:47 +0000
commit6187aa0b1bfcba7e5d956e05685ad1de42666221 (patch)
tree17b8931dfd18554ad108252c118b9bffd54920d5
parentvt: utf8-print: check base character before count when looking for existing compose chain (diff)
term: lower maximum number of characters in a compose chain
Before the grapheme cluster segmentation work, we limited the number of combining characters to base+5. I.e. 6 in total. For a while now, we’ve had it bumped all the way up to 20. This was the reason the unicode-random benchmark ran so much slower (i.e. cache contention). Looking at emoji’s, there are a couple that need 6 code points, and *three* that needs 7. Now, with the limit at 7 chars, and the new ‘width’ member, the composed struct is 8 bytes larger than before.
-rw-r--r--terminal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/terminal.h b/terminal.h
index 83406f41..307e2b0b 100644
--- a/terminal.h
+++ b/terminal.h
@@ -85,7 +85,7 @@ struct damage {
};
struct composed {
- wchar_t chars[20];
+ wchar_t chars[7];
uint8_t count;
int width;
};