Skip to content

Significantly improved performance by adding caching of combinational chips #507

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

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

Conversation

CC56785
Copy link

@CC56785 CC56785 commented May 31, 2025

Purely combinational chips, so chips whose outputs entirely depend on their inputs and on nothing else, who also don't have too many input bits, now get cached. This means that a look up table (LUT) with 2^(number of input bits) entries gets created and whenever this chip needs to determine its output, it can just use the LUT to immediately know what its output should be.

This usually gave me a speedup of up to 4x (for example my CPU went from 1500 sps to more than 5000 sps).

Also added some UI in the chip customization menu where the player can decide for medium sized chips whether they should get cached or not.
Also added a little pop up info to give progress information when creating large caches.

Any special cases (like displays, keys, tristated values, view mode, ...) also all get handled correctly (usually by turning off chip caching).

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.

1 participant