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

Improve node number equality #1955

Merged
merged 1 commit into from
Aug 25, 2023
Merged

Improve node number equality #1955

merged 1 commit into from
Aug 25, 2023

Conversation

mtdowling
Copy link
Member

Attempts to use the most optimal comparisons of number nodes, using .equals if both number values are of the same type, then the string representation of each value, finally followed by comparing the BigDecimal representation of each value using the string cache. If a BigDecimal is needed, it is cached on the number node for future checks.

Closes #1378

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling requested a review from a team as a code owner August 25, 2023 20:43
Attempts to use the most optimal comparisons of number nodes,
using .equals if both number values are of the same type, then the
string representation of each value, finally followed by comparing
the BigDecimal representation of each value using the string cache.
If a BigDecimal is needed, it is cached on the number node for future
checks.

Closes #1378
@mtdowling mtdowling force-pushed the node-number-equality branch from d5a386b to 663885e Compare August 25, 2023 21:08
@mtdowling mtdowling merged commit 8cf0da4 into main Aug 25, 2023
@mtdowling mtdowling deleted the node-number-equality branch September 11, 2023 18:21
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.

NumberNode's equal definition is impacted by the underlying representation
2 participants