• Keith Randall's avatar
    runtime: unify memeq and memequal · bd70bd9c
    Keith Randall authored
    They do the same thing, except memequal also has the short-circuit
    check if the two pointers are equal.
    
    A) We might as well always do the short-circuit check, it is only 2 instructions.
    B) The extra function call (memequal->memeq) is expensive.
    
    benchmark                 old ns/op     new ns/op     delta
    BenchmarkArrayEqual-8     8.56          5.31          -37.97%
    
    No noticeable affect on the former memeq user (maps).
    
    Fixes #14302
    
    Change-Id: I85d1ada59ed11e64dd6c54667f79d32cc5f81948
    Reviewed-on: https://go-review.googlesource.com/19843
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    bd70bd9c
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...