Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Stable sorting order for -0.0 and +0.0 for float and double. #218
Conversation
|
@canonizer Have you looked into at the performance impact of this? If not, I can use this as a case study for my new benchmarking code, but that will probably mean this won't make the 1.11.0 release. |
|
This implementation looks good to me, and the performance difference is negligible (<1% difference on GV100/GA100 from @canonizer's benchmarks). Though now I'm curious whether this is actually expected behavior for users, or if it's better to just let them pre-condition their data when they want these to be treated equivalently. I'll do some polls and confirm whether or not this is something folks expect. |
|
Looks like the stl already does stable sorts this way, so that's a nice, definitive answer :) @canonizer Can you update the |
|
I will update the documentation and add the test. |
|
@canonizer Any updates on this? I'd need to land this by Friday to make the 1.11.0 release, otherwise we can slip to 1.12.0. |
This modifies digit extraction in radix sorting to sort -0.0 and +0.0 in stable order.