diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2023-02-03 16:42:03 +1100 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2024-01-25 16:38:17 +1100 |
commit | 7ea503929a494a2622d933d3497b393ae14a1550 (patch) | |
tree | 60dceb87664e5679b6b7d39998ae7d167765f465 /docs/zephyr/tutorial/repl.rst | |
parent | 307ecc5707e78c62b0b9fb1c0ba8dcb9c4cc5559 (diff) |
py/qstr: Add support for MICROPY_QSTR_BYTES_IN_HASH=0.
This disables using qstr hashes altogether, which saves RAM and flash
(two bytes per interned string on a typical build) as well as code size.
On PYBV11 this is worth over 3k flash.
qstr comparison will now be done just by length then data. This affects
qstr_find_strn although this has a negligible performance impact as, for a
given comparison, the length and first character will ~usually be
different anyway.
String hashing (e.g. builtin `hash()` and map.c) now need to compute the
hash dynamically, and for the map case this does come at a performance
cost.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/zephyr/tutorial/repl.rst')
0 files changed, 0 insertions, 0 deletions