From 7dbbddf2a693ba929ee164310dd73db1fa5d8df8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 23 Jul 2018 15:36:45 -0400 Subject: macho backtraces - use std.sort.sort instead of insertion sort it's way faster --- std/macho.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std') diff --git a/std/macho.zig b/std/macho.zig index 33c170ff43..ddc4d334e4 100644 --- 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. -- cgit v1.2.3