commit 7dbbddf2a693ba929ee164310dd73db1fa5d8df8 (tree)
parent 5a919dd82d798c489219ea60a59f1c0ea3fc3956
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Mon, 23 Jul 2018 15:36:45 -0400
macho backtraces - use std.sort.sort instead of insertion sort
it's way faster
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/std/macho.zig b/std/macho.zig
@@ -141,7 +141,7 @@ pub fn loadSymbols(allocator: *mem.Allocator, in: *io.FileInStream) !SymbolTable
}
// Effectively a no-op, lld emits symbols in ascending order.
- std.sort.insertionSort(Symbol, symbols[0..nsyms], Symbol.addressLessThan);
+ std.sort.sort(Symbol, symbols[0..nsyms], Symbol.addressLessThan);
// Insert the sentinel. Since we don't know where the last function ends,
// we arbitrarily limit it to the start address + 4 KB.