The Wayback Machine - https://web.archive.org/web/20220623142005/https://github.com/adafruit/circuitpython/pull/6397
Skip to content
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

Some flash size optimizations related to string0.c (implementation of str/mem functions) #6397

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jepler
Copy link
Member

@jepler jepler commented May 14, 2022

This saves 124 bytes on trinket m0, though at some performance cost (I didn't measure). On "full build"s it saves 24 bytes, the rest is only saved on small builds.

Taking just the extra memset() removal part of the patch saves 24 bytes of flash, removing the int-at-a-time optimization from string0 saves 100.

It's lightly tested on a pygamer with the de-optimization manually enabled (it wouldn't be enabled on a pygamer by default).

jepler added 2 commits May 14, 2022
This saves 24 bytes of flash on trinket m0
This saves 100 bytes on trinket_m0 at the price of making many memset &
memcpy calls slower.
@dhalbert dhalbert added this to the 7.x.x milestone May 14, 2022
@dhalbert dhalbert removed this from the 7.x.x milestone May 24, 2022
@dhalbert dhalbert added this to the 8.0.0 milestone May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants