Skip to content
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

Replace nonexistent std.sort.sort with std.mem.sort #1198

Merged
merged 2 commits into from
May 25, 2023

Conversation

Tyrubias
Copy link
Contributor

The pull request ziglang/zig#15412 changes the sorting functions built into Zig and as a result std.sort.sort doesn't exist anymore. This pull request changes usages of std.sort.sort to std.mem.sort which is consistent with the changes made in the standard library to change std.sort.sort to std.mem.sort. Currently, std.mem.sort calls std.sort.block, which is an stable in-place sort with $O(n)$ best case, $O(n\log(n))$ worst case, and $O(n\log(n))$ average case time complexity. The block sort also has $O(1)$ memory usage.

@leecannon
Copy link
Member

Just waiting for the zig tarballs to update with this change.

@leecannon
Copy link
Member

CI is failing due to #1199
But local tests are passing.

@leecannon leecannon merged commit 33121da into zigtools:master May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants