std.sort: add pdqsort and heapsort

This commit is contained in:
Ali Chraghi
2023-05-23 15:33:12 +03:30
committed by Andrew Kelley
parent bfe02ff61a
commit 3db3cf7790
37 changed files with 1797 additions and 1386 deletions

View File

@@ -260,7 +260,7 @@ pub fn main() !void {
try contents_list.append(contents);
}
}
std.sort.sort(*Contents, contents_list.items, {}, Contents.hitCountLessThan);
std.mem.sort(*Contents, contents_list.items, {}, Contents.hitCountLessThan);
const best_contents = contents_list.popOrNull().?;
if (best_contents.hit_count > 1) {
// worth it to make it generic