-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[RyuJIT] Devirtualize Comparer<T>.Default #48160
Conversation
Sweet! |
cc: @eiriktsarpalis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the enum comparer gets inlined and optimized w/o needing annotation, but can you double-check?
Did you try crossgenning your test and then running it? Would be good to get somebody more familiar with crossgen2 to sign off on the changes there.
Changes LGTM, just some comments on comments.
80a75a1
to
5c0b3d5
Compare
Yeah, the tests pass with crossgen2 |
@dotnet/crossgen-contrib can somebody take a quick look at the crossgen2 changes here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crossgen2-related changes look good to me, thank you!
I ran my PriorityQueue benchmarks against the PR branch: this compares a heap implementation using master branch
PR branch
|
Nice work @EgorBo!
@adamsitnik Would be nice to fix the benchmark harness so you can pass multiple --corerun args and have it compare them, like it can do for --runtimes. |
You can, unless I'm misunderstanding what you're asking for. I do this all the time:
|
Guess I'm confused. Maybe what I was thinking was allowing a mixture of --runtimes and --corerun . |
@EgorBo this seems to cause a warning in CI, would you mind fixing it:
|
See #43796
Mostly a copy-paste from the existing
EqualityComparer<T>.Default
devirtualization.Example:
master:
PR:
JIT diff is empty but it should allow to write generic versions of
Max<T>
/Min<T>
functions (#43796).