Skip to content
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

Optimize Sets, Maps, and Module.input/output getters #347

Merged
merged 8 commits into from
Apr 21, 2023

Conversation

mkorbel1
Copy link
Contributor

Description & Motivation

There are a variety of places where ordered Sets and Maps are used when unordered would be fine and offer a slight performance boost that adds up since they are used in fundamental building blocks for designs. Replacing them with unordered versions can give a significiant performance boost.

There are other places where Module.input and Module.output are called during simulation execution. This requires a Map lookup during execution, which is an unnecessary simulation-time performance penalty. Replacing the getters that called input and output with laze initialized variables (late final) removes all of those penalties.

This also removes some inputs from the public API of FlipFlop that shouldn't have ever been there.

Related Issue(s)

N/A

Testing

Existing tests cover it

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Yes, public getters removed from FlipFlop for clk and d. But nobody should have been using them, so more like a bug fix.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No

@mkorbel1 mkorbel1 merged commit 7f9c7f8 into intel:main Apr 21, 2023
@mkorbel1 mkorbel1 deleted the optsetsngets branch April 21, 2023 22:09
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