From 558b64544c5181edccb85d8f6b34bb90265c0eb9 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Sun, 21 Jan 2024 18:09:55 -0600 Subject: [PATCH] grapheme_cache: increase cache size Signed-off-by: Tim Culverhouse --- src/GraphemeCache.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GraphemeCache.zig b/src/GraphemeCache.zig index 779646e..2d3dc29 100644 --- a/src/GraphemeCache.zig +++ b/src/GraphemeCache.zig @@ -3,15 +3,15 @@ const testing = std.testing; const GraphemeCache = @This(); -/// the underlying storage for graphemes -buf: [1024 * 4]u8 = undefined, +/// the underlying storage for graphemes. Right now 8kb +buf: [1024 * 8]u8 = undefined, // the start index of the next grapheme idx: usize = 0, -/// the cache of graphemes. This allows up to 1024 graphemes with 4 codepoints +/// the cache of graphemes. This allows up to 2048 graphemes with 4 codepoints /// each -grapheme_buf: [1024]Grapheme = undefined, +grapheme_buf: [1024 * 8 / 4]Grapheme = undefined, // index of our next grapheme g_idx: u21 = 0,