Open arturo182 opened 5 years ago
Here's a build straight from master:
234496 bytes free in flash out of 499712 bytes ( 488.0 kb ).
178776 bytes free in ram for stack out of 196608 bytes ( 192.0 kb ).
And here's a build with MICROPY_PY_DELATTR_SETATTR=1
:
234376 bytes free in flash out of 499712 bytes ( 488.0 kb ).
178776 bytes free in ram for stack out of 196608 bytes ( 192.0 kb ).
To sum up: -120B free flash -0B free stack
This was for feather_m4_express
.
Did you try it for all builds? It'd be awesome if it was uniformly on. (Please make a PR for it too.) Thanks!
This got turned out at some point. I tested on Trinket M0, Metro M4, RP2040.
Sorry, this is about __setattr__
() and __delattr__()
, not setattr()
and delattr()
. Reopening.
Has anyone looked at the cost of enabling
MICROPY_PY_DELATTR_SETATTR
?It's off by default, but it's on for the stm32 port, and I just found out it was off the hard way, by trying to debug why my code doesn't work for 2h :<
According to the commit enabling it in stm32, there's no performance hit in the classes that don't implement it, see https://github.com/adafruit/circuitpython/commit/190c7dba89dbb1165f682b56f278e3bc9715680c
The commit also mentions
MICROPY_PY_BUILTINS_NOTIMPLEMENTED
which is enabled in SAMD51 builds already.If we could enable it for SAMD51, that would help me a lot :pray: