authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-07-23 15:36:45-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-07-23 15:36:45-04:00
log7dbbddf2a693ba929ee164310dd73db1fa5d8df8
tree6c38da8c0b58fbc4d2189217bffdb2de95909d0c
parent5a919dd82d798c489219ea60a59f1c0ea3fc3956

macho backtraces - use std.sort.sort instead of insertion sort

it's way faster

1 files changed, 1 insertions(+), 1 deletions(-)

std/macho.zig+1-1
...@@ -141,7 +141,7 @@ pub fn loadSymbols(allocator: *mem.Allocator, in: *io.FileInStream) !SymbolTable...@@ -141,7 +141,7 @@ pub fn loadSymbols(allocator: *mem.Allocator, in: *io.FileInStream) !SymbolTable
141 }141 }
142142
143 // Effectively a no-op, lld emits symbols in ascending order.143 // Effectively a no-op, lld emits symbols in ascending order.
144 std.sort.insertionSort(Symbol, symbols[0..nsyms], Symbol.addressLessThan);144 std.sort.sort(Symbol, symbols[0..nsyms], Symbol.addressLessThan);
145145
146 // Insert the sentinel. Since we don't know where the last function ends,146 // Insert the sentinel. Since we don't know where the last function ends,
147 // we arbitrarily limit it to the start address + 4 KB.147 // we arbitrarily limit it to the start address + 4 KB.