8000 update flash chip for Metro M7 1011 by dhalbert · Pull Request #7542 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

update flash chip for Metro M7 1011 #7542

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

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

dhalbert
Copy link
Collaborator
@dhalbert dhalbert commented Feb 3, 2023

No description provided.

@dhalbert dhalbert requested a review from ladyada February 3, 2023 16:53
Copy link
Member
@ladyada ladyada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works great :)

@dhalbert dhalbert merged commit 3a82730 into adafruit:main Feb 3, 2023
@dhalbert dhalbert deleted the metro-m7-flash-64 branch February 3, 2023 17:25
dhalbert pushed a commit to dhalbert/circuitpython that referenced this pull request Sep 19, 2023
The existings mp_obj_type_t uses a sparse representation for slots for the
capability methods of the type (eg print, make_new).  This commit adds a
compact slot-index representation.  The basic idea is that where the
mp_obj_type_t struct used to have 12 pointer fields, it now has 12 uint8_t
indices, and a variable-length array of pointers.  So in the best case (no
fields used) it saves 12x4-12=36 bytes (on a 32-bit machine) and in the
common case (three fields used) it saves 9x4-12=24 bytes.

Overall with all associated changes, this slot-index representation reduces
code size by 1000 to 3000 bytes on bare-metal ports.  Performance is
marginally better on a few tests (eg about 1% better on misc_pystone.py and
misc_raytrace.py on PYBv1.1), but overall marginally worse by a percent or
so.

See issue adafruit#7542 for further analysis and discussion.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0