Commit 7dbbddf2a6

Andrew Kelley <superjoe30@gmail.com>
2018-07-23 21:36:45
macho backtraces - use std.sort.sort instead of insertion sort
it's way faster
1 parent 5a919dd
Changed files (1)
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.