[RyuJIT] Devirtualize Comparer<T>.Default#48160
Conversation
|
Sweet! |
|
cc: @eiriktsarpalis |
AndyAyersMS
left a comment
There was a problem hiding this comment.
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? |
trylek
left a comment
There was a problem hiding this comment.
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>.Defaultdevirtualization.Example:
master:
PR:
JIT diff is empty but it should allow to write generic versions of
Max<T>/Min<T>functions (#43796).