• Josh Bleecher Snyder's avatar
    cmd/internal/obj: add SortSlice · 826a09cd
    Josh Bleecher Snyder authored
    sort.Slice was added in Go 1.8.
    It's nice to use, and faster than sort.Sort,
    so it'd be nice to be able to use it in the toolchain.
    This CL adds obj.SortSlice, which is sort.Slice,
    but with a slower fallback version for bootstrapping.
    
    This CL also includes a single demo+test use.
    
    Change-Id: I2accc60b61f8e48c8ab4f1a63473e3b87af9b691
    Reviewed-on: https://go-review.googlesource.com/40114
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    826a09cd
sort.go 294 Bytes