1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-20 00:59:02 +00:00

perf(core): intern single-digit strings

[no changelog]
This commit is contained in:
Roman Zeyde 2025-03-26 20:48:42 +02:00 committed by Roman Zeyde
parent bafad6e453
commit ac0fc30ee9
2 changed files with 14 additions and 0 deletions

View File

@ -5,6 +5,16 @@
#pragma GCC diagnostic ignored "-Wunused-function"
static void _librust_qstrs(void) {
MP_QSTR_0;
MP_QSTR_1;
MP_QSTR_2;
MP_QSTR_3;
MP_QSTR_4;
MP_QSTR_5;
MP_QSTR_6;
MP_QSTR_7;
MP_QSTR_8;
MP_QSTR_9;
MP_QSTR_;
MP_QSTR_ATTACHED;
MP_QSTR_AttachType;

View File

@ -45,9 +45,13 @@ for prefix in ALTCOIN_PREFIXES:
qstrings_btconly = qstrings - qstrings_universal
# sort result alphabetically
digits = range(10)
qstrings_btconly_sorted = sorted(qstrings_btconly)
qstrings_universal_sorted = sorted(qstrings_universal)
%>\
% for digit in digits:
MP_QSTR_${digit};
% endfor
% for qstr in qstrings_btconly_sorted:
${qstr};
% endfor