-
-
Notifications
You must be signed in to change notification settings - Fork 80
bricks/_common/Makefile: Enable CSUPEROPT for smaller binaries. #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
So maybe we should follow and only apply it to |
|
Apparently that comment has a different idea about what small code size is. 😮 Sounds reasonable to use |
20% speed increase for 0.5% build size (2K on 400K builds) is probably worth it for most boards where space is not an issue. We can make the trade-off the other way.
👍 I came across this option as I was working on a new embedded simulation build (which had it enabled by default), so even if this is all to come out of that, it was worth it 😄 |
Reduces build size: Move Hub: -2400 Technic Hub: -2400 At the cost of slightly slower performance of the VM. These hubs are almost running out of space, so this is more important.
ab6e86e to
0b854ba
Compare
|
On Technic Hub, the savings are 2400 bytes at a reduction of only 635 to 611 pystones/sec, so -4%, which is certainly worth it. |
|
The savings are even larger, but we are also seeing that there was a big initial bump in size on going to MicroPython 1.26.
For Move Hub, there wasn't a jump when going to 1.26:
So it might have been a specific feature rather than the base becoming much larger. And maybe this feature isn't needed on Technic Hub either. Part of this is floating point support, but this covers only a portion of the increase (about 350 bytes). |


Looks like we were missing considerable savings with this build option.
Reduces build size:
Looks like MicroPython enables this for:
For everything else:
Which is probably to optimize for speed. We also find in the MicroPython source: