grapheme_cache: increase cache size

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Tim Culverhouse 2024-01-21 18:09:55 -06:00
parent 40525eb038
commit 558b64544c

View file

@ -3,15 +3,15 @@ const testing = std.testing;
const GraphemeCache = @This(); const GraphemeCache = @This();
/// the underlying storage for graphemes /// the underlying storage for graphemes. Right now 8kb
buf: [1024 * 4]u8 = undefined, buf: [1024 * 8]u8 = undefined,
// the start index of the next grapheme // the start index of the next grapheme
idx: usize = 0, 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 /// each
grapheme_buf: [1024]Grapheme = undefined, grapheme_buf: [1024 * 8 / 4]Grapheme = undefined,
// index of our next grapheme // index of our next grapheme
g_idx: u21 = 0, g_idx: u21 = 0,