Skip to content

tools: Add C middle-processor to make builtin tables proper hash tables. #1731

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

Closed
wants to merge 1 commit into from

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy