Skip to content

Enable ure, center, partition, frozenset, splitlines, reversed for Express builds. #138

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 2 commits into from
May 22, 2017

Conversation

dhalbert
Copy link
Collaborator

The Express builds have >40k free in flash. I've added several minor Python features that were turned off, but are small and convenient. I also turned on one major extra: the ure module, which is very useful for reducing the size of ad hoc parsing code.

Bytes used for each addition (measured in 0.9.7 builds):
47588 bytes free in flash
MICROPY_PY_BUILTINS_STR_CENTER: 120 bytes
MICROPY_PY_BUILTINS_STR_PARTITION: 264 bytes
MICROPY_PY_BUILTINS_STR_FROZENSET: 272 bytes
MICROPY_PY_BUILTINS_STR_SPLITLINES: 200 bytes
MICROPY_PY_BUILTINS_REVERSED: 176 bytes
MICROPY_PY_URE: 2944 bytes
total 4096
before additions: 47588 bytes free
after: 43592 bytes free

A couple of notes:

  1. frozenset is actually slightly broken: the sets aren't immutable (fixed in a later version of micropython).
  2. I also tried adding ujson, but there were errors building due to some #defines in vfs_fat_file.h (here) that cause undefined symbols. This is also fixed in a later version of micropython: the vfs code was refactored significantly.

@tannewt tannewt self-requested a review May 22, 2017 04:58
@tannewt tannewt merged commit 9071889 into adafruit:master May 22, 2017
@dhalbert dhalbert mentioned this pull request Jun 5, 2017
@dhalbert dhalbert deleted the add-ure-et-al branch June 5, 2017 16:53
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