diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-01-13 12:37:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-01-13 12:42:12 +0000 |
| commit | 5a032c4c6f6517e664ac7b920c3cfae8d5a25b05 (patch) | |
| tree | f8ecfdb25f1ecdc623f911edae9d654554b64609 /scripts/benchmark.py | |
| parent | doc: ctlseq: add XTGETTCAP (diff) | |
xtgettcap: switch from a table based internal structure, to a single char array
Having the builtin terminfo DB as a table, with one entry per
capability/value pair was ineffective memory-wise - we ended up adding
~20K to the final binary size.
This patch changes the internal representation from a table, to a
single NULL-separated (and NULL-terminated) char array:
cap1-name \0 cap1-value \0 cap2-name \0 cap2-value \0
The capabilities are still sorted; to lookup a capability we need to
scan from the beginning until we either find a match, or until the
capabilities from the DB sort higher (lexicographically) than the
searched-for capability.
The terminfo char array is 3.3K - more better than before.
Diffstat (limited to 'scripts/benchmark.py')
0 files changed, 0 insertions, 0 deletions
