Skip to content

Commit d76f61a

Browse files
dlechlaurensvalk
authored andcommitted
bricks/_common/mpconfigport.h: Set MICROPY_QSTR_BYTES_IN_HASH 0 on small hubs.
To save some flash memory, we can set MICROPY_QSTR_BYTES_IN_HASH to 0 on small hubs. On big hubs, setting it to 2 can improve performance.
1 parent ddb5cfc commit d76f61a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bricks/_common/mpconfigport.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
X(ETIMEDOUT) \
3737
X(ECANCELED) \
3838

39-
#define MICROPY_QSTR_BYTES_IN_HASH (1)
39+
#if PYBRICKS_OPT_EXTRA_LEVEL2
40+
#define MICROPY_QSTR_BYTES_IN_HASH (2)
41+
#else
42+
#define MICROPY_QSTR_BYTES_IN_HASH (0)
43+
#endif
4044
#define MICROPY_ALLOC_PATH_MAX (256)
4145
#define MICROPY_ALLOC_PARSE_CHUNK_INIT (16)
4246
#define MICROPY_EMIT_X64 (PYBRICKS_OPT_NATIVE_MOD && __x86_64__)

0 commit comments

Comments
 (0)