• Josh Bleecher Snyder's avatar
    runtime: prevent pointless jmp in amd64 and 386 memmove · bc9e1604
    Josh Bleecher Snyder authored
    6a and 8a rearrange memmove such that the fallthrough from move_1or2 to move_0 ends up being a JMP to a RET. Insert an explicit RET to prevent such silliness.
    
    Do the same for memclr as prophylaxis.
    
    benchmark                old ns/op     new ns/op     delta
    BenchmarkMemmove1        4.59          4.13          -10.02%
    BenchmarkMemmove2        4.58          4.13          -9.83%
    
    LGTM=khr
    R=golang-codereviews, dvyukov, minux, ruiu, bradfitz, khr
    CC=golang-codereviews
    https://golang.org/cl/120930043
    bc9e1604
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...