Repository navigation
Fix sorting of tied iteration timings. - #338
Open
jirkamarsik wants to merge 1 commit into
Open
jirkamarsik wants to merge 1 commit into
jirkamarsik wants to merge 1 commit into
Conversation
Return zero when iteration times are equal. An inconsistent comparator can leave results out of order and underestimate the Worst phase on GraalJS.
👷 Deploy request for webkit-jetstream-preview pending review.Visit the deploys page to approve it
|
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.
The descending timing comparator returns
-1for equal values, violating the comparator contract. On GraalJS, this can leave timings out of order and underestimate the Worst phase.Use numeric descending comparison so ties compare as zero. Add a regression with many samples at the 1 ms floor: the old comparator reports a Worst time of 1.25 ms on GraalJS instead of the correct 4 ms. The test also checks that First and Average are unchanged.
The regression fails before the fix and passes afterward on native GraalJS. The full
tests/unit-tests.jssuite passes on V8 15.8.62.91.Suggested review order: the comparator in
DefaultBenchmark.processResults, then the regression intests/unit-tests.js.