py: Make qstr hash size configurable, defaults to 2 bytes.
This patch makes configurable, via MICROPY_QSTR_BYTES_IN_HASH, the number of bytes used for a qstr hash. It was originally fixed at 2 bytes, and now defaults to 2 bytes. Setting it to 1 byte will save ROM and RAM at a small expense of hash collisions.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
// qstr configuration passed to makeqstrdata.py of the form QCFG(key, value)
|
||||
QCFG(BYTES_IN_LEN, MICROPY_QSTR_BYTES_IN_LEN)
|
||||
QCFG(BYTES_IN_HASH, MICROPY_QSTR_BYTES_IN_HASH)
|
||||
|
||||
Q()
|
||||
Q(*)
|
||||
|
||||
Reference in New Issue
Block a user