• Keith Randall's avatar
    internal/bytealg: move IndexByte asssembly to the new bytealg package · 403ab0f2
    Keith Randall authored
    Move the IndexByte function from the runtime to a new bytealg package.
    The new package will eventually hold all the optimized assembly for
    groveling through byte slices and strings. It seems a better home for
    this code than randomly keeping it in runtime.
    
    Once this is in, the next step is to move the other functions
    (Compare, Equal, ...).
    
    Update #19792
    
    This change seems complicated enough that we might just declare
    "not worth it" and abandon.  Opinions welcome.
    
    The core assembly is all unchanged, except minor modifications where
    the code reads cpu feature bits.
    
    The wrapper functions have been cleaned up as they are now actually
    checked by vet.
    
    Change-Id: I9fa75bee5d85db3a65b3fd3b7997e60367523796
    Reviewed-on: https://go-review.googlesource.com/98016
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    403ab0f2
indexbyte_generic.go 888 Bytes