• Robert Griesemer's avatar
    cmd/compile: make internal objects directly print to printer · f7ac5da4
    Robert Griesemer authored
    Internal objects that satisfy the Printable interface can print
    directly to a printer w/o going through the conversion to a string
    first.
    
    Made printer.f understand and special-case %v so that Printable
    objects use the printer directly.
    
    This is work in progress and we may end up doing something else
    eventually (perhaps using fmt.Formatter) - or even undo these
    changes if this exploration doesn't get us to a significantly
    better place.
    
    Allocations numbers relative to commit c85b77c2 (still up, but
    reduced from most recent change):
    
    name       old time/op     new time/op     delta
    Template       307ms ± 4%      315ms ± 4%   +2.55%        (p=0.000 n=29+29)
    Unicode        164ms ± 4%      165ms ± 4%     ~           (p=0.057 n=30+30)
    GoTypes        1.01s ± 3%      1.03s ± 3%   +1.72%        (p=0.000 n=30+30)
    Compiler       5.49s ± 1%      5.62s ± 2%   +2.31%        (p=0.000 n=30+28)
    
    name       old user-ns/op  new user-ns/op  delta
    Template        397M ± 3%       406M ± 6%   +2.21%        (p=0.000 n=28+30)
    Unicode         225M ± 4%       226M ± 3%     ~           (p=0.230 n=29+30)
    GoTypes        1.31G ± 3%      1.34G ± 5%   +2.79%        (p=0.000 n=30+30)
    Compiler       7.39G ± 2%      7.50G ± 2%   +1.43%        (p=0.000 n=30+29)
    
    name       old alloc/op    new alloc/op    delta
    Template      46.8MB ± 0%     47.5MB ± 0%   +1.48%        (p=0.000 n=29+28)
    Unicode       37.8MB ± 0%     38.1MB ± 0%   +0.64%        (p=0.000 n=30+28)
    GoTypes        143MB ± 0%      145MB ± 0%   +1.72%        (p=0.000 n=30+30)
    Compiler       683MB ± 0%      706MB ± 0%   +3.31%        (p=0.000 n=30+29)
    
    name       old allocs/op   new allocs/op   delta
    Template        444k ± 0%       481k ± 0%   +8.38%        (p=0.000 n=30+30)
    Unicode         369k ± 0%       379k ± 0%   +2.74%        (p=0.000 n=30+30)
    GoTypes        1.35M ± 0%      1.50M ± 0%  +10.78%        (p=0.000 n=30+30)
    Compiler       5.66M ± 0%      6.25M ± 0%  +10.31%        (p=0.000 n=29+29)
    
    For #16897.
    
    Change-Id: I37f95ab60508018ee6d29a98d238482b60e3e4b5
    Reviewed-on: https://go-review.googlesource.com/28072Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    f7ac5da4
Name
Last commit
Last update
..
archive Loading commit data...
bufio Loading commit data...
builtin Loading commit data...
bytes Loading commit data...
cmd Loading commit data...
compress Loading commit data...
container Loading commit data...
context Loading commit data...
crypto Loading commit data...
database/sql Loading commit data...
debug Loading commit data...
encoding Loading commit data...
errors Loading commit data...
expvar Loading commit data...
flag Loading commit data...
fmt Loading commit data...
go Loading commit data...
hash Loading commit data...
html Loading commit data...
image Loading commit data...
index/suffixarray Loading commit data...
internal Loading commit data...
io Loading commit data...
log Loading commit data...
math Loading commit data...
mime Loading commit data...
net Loading commit data...
os Loading commit data...
path Loading commit data...
reflect Loading commit data...
regexp Loading commit data...
runtime Loading commit data...
sort Loading commit data...
strconv Loading commit data...
strings Loading commit data...
sync Loading commit data...
syscall Loading commit data...
testing Loading commit data...
text Loading commit data...
time Loading commit data...
unicode Loading commit data...
unsafe Loading commit data...
vendor/golang_org/x/net Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
androidtest.bash Loading commit data...
bootstrap.bash Loading commit data...
buildall.bash Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
cmp.bash Loading commit data...
iostest.bash Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
naclmake.bash Loading commit data...
nacltest.bash Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...