Optimize VConstr bounds check in CEK machine#7479
Merged
Conversation
Simplify the type conversion in VConstr index validation by eliminating unnecessary intermediate conversion through Integer. Changed from: fromIntegral @_ @integer i > fromIntegral @int @integer maxBound To: i > fromIntegral @int @Word64 maxBound Since i is already Word64, we can directly compare it to maxBound converted to Word64, which is more efficient and clearer. Also updated Note [Integral types as Integer] to clarify that all non-64-bit systems (not just 32-bit) are banned for node deployment. Fixes #7478
Collaborator
|
/benchmark validation |
Contributor
|
Click here to check the status of your benchmark. |
Collaborator
|
/benchmark casing |
Collaborator
|
/benchmark lists |
Contributor
|
Comparing benchmark results of 'validation' on 'dd37ea88ba' (base) and 'ab471bee84' (PR) Results table
|
Contributor
|
Click here to check the status of your benchmark. |
Contributor
|
Comparing benchmark results of 'casing' on 'dd37ea88ba' (base) and 'ab471bee84' (PR) Results table
|
Contributor
|
Click here to check the status of your benchmark. |
Contributor
Contributor
|
/benchmark lists |
Contributor
|
Click here to check the status of your benchmark. |
Contributor
|
Comparing benchmark results of 'lists' on 'dd37ea88ba' (base) and 'ab471bee84' (PR) Results table
|
Contributor
|
/benchmark nofib |
Contributor
|
Click here to check the status of your benchmark. |
Contributor
|
Comparing benchmark results of 'nofib' on 'dd37ea88ba' (base) and 'ab471bee84' (PR) Results table
|
zliu41
approved these changes
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Optimizes the CEK machine's handling of VConstr by simplifying type conversions and updating documentation.
Changes
1. Simplified Type Conversion
Before:
After:
Since
iis alreadyWord64, we can directly compare it tomaxBound :: Intconverted toWord64, eliminating the unnecessary intermediate conversion throughInteger. This is more efficient and clearer.2. Updated Documentation
Updated Note [Integral types as Integer] to clarify that all non-64-bit systems (not just 32-bit) are banned for node deployment. Changed wording from "we don't care about" to "64-bit systems are required for" for better tone.
Related
Fixes #7478