Skip to content

Further improve performance#4

Open
FreezePhoenix wants to merge 11 commits intoFilipssh:multiOutputfrom
FreezePhoenix:main
Open

Further improve performance#4
FreezePhoenix wants to merge 11 commits intoFilipssh:multiOutputfrom
FreezePhoenix:main

Conversation

@FreezePhoenix
Copy link

This PR caches gate results to avoid recomputing a significant amount of data, and significantly reduces the amount of memory used by consolidating values (terms stay in the term dictionary, and we only store their identifier).

Improve performance in scenarios where a pair of terms must be used.
This is the first commit out of a two-part series that improves performance further. This PR caches gate results to avoid recomputing a significant amount of data, and significantly reduces the amount of memory used by consolidating values (terms stay in the term dictionary, and we only store their identifier).
This is the second commit out of a two-part series that improves performance further. This PR caches gate results to avoid recomputing a significant amount of data, and significantly reduces the amount of memory used by consolidating values (terms stay in the term dictionary, and we only store their identifier).
@FreezePhoenix
Copy link
Author

A second set of changes have been made that fix a regression I accidentally caused (wire_lamps was not actually correct anymore).

Additionally, we now print out ORs instead of ANDs, as while they are functionally equivalent, they are free since we are already computing OR for XOR, and this allows us to avoid computing extraneous terms.

From my measurements on Edge, this took the runtime for the sample input xxx0011011001100 down from 15ms to 0.5ms.

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