Micro optimisation
Dont lookup char props for ascii char at start of draw command. Improves benchmark by 2-5%
This commit is contained in:
parent
53aea0642f
commit
83bc0423b2
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue