From e54a761768c62070d53801dd75159232e29197ec Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 29 Oct 2024 20:16:49 +0530 Subject: [PATCH] Micro-optimization Use 31 bits for the index rather than 32bits. --- kitty/line.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/line.h b/kitty/line.h index d7e455be8..f9157fb27 100644 --- a/kitty/line.h +++ b/kitty/line.h @@ -42,10 +42,10 @@ static_assert(sizeof(GPUCell) == 20, "Fix the ordering of GPUCell"); typedef union CPUCell { struct { - char_type ch_or_idx: sizeof(char_type) * 8; - hyperlink_id_type hyperlink_id: sizeof(hyperlink_id_type) * 8; bool ch_is_idx: 1; - uint16_t : 15; + char_type ch_or_idx: sizeof(char_type) * 8 - 1; + hyperlink_id_type hyperlink_id: sizeof(hyperlink_id_type) * 8; + uint16_t : 16; }; uint64_t val; } CPUCell;