10BC0 tools: Add C middle-processor to make builtin tables proper hash tables. by dpgeorge · Pull Request #1731 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@dpgeorge
Copy link
Member

This tool sits in between the C preprocessor and the C compiler. It takes the output of the C preprocessor and reorders any builtin tables to make them proper hash tables. Lookups at runtime then use hashing, not linear search. For large tables it makes the lookup a lot faster (don't have solid data though on speed improvements...).

See script for usage.

@dpgeorge dpgeorge added the enhancement Feature requests, new feature implementations label Dec 19, 2015
@dpgeorge
Copy link
Member Author

This was work done as part of the ESA project. Main reason for the PR is to advertise this new tool.

@dpgeorge
Copy link
Member Author

Using this script to compile stmhal, pyboard gives a 2.5% increase in performance of pystone benchmark at zero cost of flash or RAM. Combining this with recent patch bbe8d51 takes pyboard pystone result from 1776 to 1901 (using 20000 iterations).

@dpgeorge
Copy link
Member Author

Merged in 4bd95f8.

@dpgeorge dpgeorge closed this Dec 31, 2015
@danicampora
Copy link
Member

Wow! Very cool Damien.

@dpgeorge dpgeorge deleted the cc1 branch January 17, 2016 19:39
tannewt added a commit to tannewt/circuitpython that referenced this pull request Apr 3, 2019
Improved readability of Single Byte Bounds code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests, new feature implementations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0