• Josh Bleecher Snyder's avatar
    cmd/6g, cmd/8g: make 2/3 word sgen more efficient · 747c8498
    Josh Bleecher Snyder authored
    When compiling the stdlib most of the calls
    to sgen are for exactly 2 or 3 words:
    85% for 6g and 70% for 8g.
    Special case them for performance.
    This optimization is not relevant to 5g and 9g.
    
    6g
    
    benchmark                old ns/op     new ns/op     delta
    BenchmarkCopyFat16       3.25          0.82          -74.77%
    BenchmarkCopyFat24       5.47          0.95          -82.63%
    
    8g
    
    benchmark               old ns/op     new ns/op     delta
    BenchmarkCopyFat8       3.84          2.42          -36.98%
    BenchmarkCopyFat12      4.94          2.15          -56.48%
    
    Change-Id: I8bc60b453f12597dfd916df2d072a7d5fc33ab85
    Reviewed-on: https://go-review.googlesource.com/2607Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    747c8498
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include 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...