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 LogicValue operations to avoid Strings where possible #215

Merged
merged 9 commits into from
Dec 5, 2022

Conversation

mkorbel1
Copy link
Contributor

@mkorbel1 mkorbel1 commented Dec 1, 2022

Description & Motivation

String manipulation is not ideal for performance but was used in a number of places for LogicValue operations. This PR removes some of those places where possible.

See conversation that initiated some of these changes here: #213 (comment)

This PR specifically fixes:

  • Conversion to unsigned int from BigInt to not use String
  • LogicValue.of to not use String (which also optimizes all of the swizzle operations on LogicValue)

Related Issue(s)

Fixed #202 (since it was convenient for implementation)

Improved upon fixes in #213

Testing

Added new tests to cover potential corner cases

Backwards-compatibility

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

No

Documentation

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

No

lib/src/values/logic_value.dart Outdated Show resolved Hide resolved
lib/src/values/small_logic_value.dart Show resolved Hide resolved
@mkorbel1 mkorbel1 changed the title Optimize LogicValue opterations to avoid Strings where possible Optimize LogicValue operations to avoid Strings where possible Dec 2, 2022
@mkorbel1 mkorbel1 merged commit e59d270 into intel:main Dec 5, 2022
@mkorbel1 mkorbel1 deleted the optswizzle branch December 5, 2022 18:39
quekyj pushed a commit to quekyj/rohd that referenced this pull request Jan 9, 2023
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.

Make a shortcut to create a 0-width LogicValue
2 participants