Optimize LogicValue operations to avoid Strings where possible #215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
int
fromBigInt
to not useString
LogicValue.of
to not useString
(which also optimizes all of theswizzle
operations onLogicValue
)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
No
Documentation
No