vt: remove xassert(), that cannot be optimized out, from action_print()

action_print() is in the hot path, and having if-statement here *does*
have an impact on performance.

Much more so when that if-statement involves a functional call to
wcwidth().

Closes #330
This commit is contained in:
Daniel Eklöf 2021-02-07 11:14:07 +01:00
parent 7cb49681e7
commit cb60ddd090
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
vt.c
View file

@ -238,8 +238,6 @@ action_print(struct terminal *term, uint8_t c)
L'', L'', L'', L'π', L'', L'£', L'·', /* x - ~ */
};
xassert(wcwidth(c) == 1);
if (unlikely(term->charsets.set[term->charsets.selected] == CHARSET_GRAPHIC) &&
c >= 0x60 && c <= 0x7e)
{