-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Replace CQuickSort with qsort in GC info encoders. #4163
Conversation
@russellhadley @jkotas @BruceForstall @dotnet/jit-contrib PTAL This is part of #4127. |
I suspect that the perf will be pretty much a wash, but the GC info encoding was the source of some really bad outliers throughput-wise. I would recommend doing some throughput measurements. |
This removes another utilcode dependency from the GC info encoders.
Why do you bother changing the encoder code at all? Why not just extract CQuickSort into a separate file, without dependencies, and just use the code as-is? Then there would be no question about correctness or performance. |
Primarily because As a secondary concern, |
Since you don't seem to be worried much about sharing source code, you could always create a clone of CQuickSort and rip out the VM-specific code (contracts) without affecting its behavior. Your change makes two changes at once: (1) extracting dependencies from utilcode, and (2) rewriting to change algorithms/data structures in a way you argue is preferable. These do not need to be conflated, and I believe #2 is unnecessary. Even if "general goodness", it's not clear we should spend time on this anyway. |
Cloning and cleaning up CQuickSort to be standalone would be more work and larger delta that just switching the two places to qsort. The approach that @pgavlin has taken for this one makes sense to me. |
LGTM |
@CarolEidt: local testing indicates that any throughput differences are within the noise. |
@pgavlin - thanks for testing! |
Replace CQuickSort with qsort in GC info encoders. Commit migrated from dotnet/coreclr@96580e4
This removes another utilcode dependency from the GC info encoders.