• Ian Lance Taylor's avatar
    cmd/compile: don't create 2 Sym's and 2 Node's for every string · 65b40204
    Ian Lance Taylor authored
    For every string constant the compiler was creating 2 Sym's and 2
    Node's.  It would never refer to them again, but would keep them alive
    in gostringpkg.  This changes the code to just use obj.LSym's instead.
    
    When compiling x/tools/go/types, this yields about a 15% reduction in
    the number of calls to newname and a 3% reduction in the total number of
    Node objects.  Unfortunately I couldn't see any change in compile time,
    but reducing memory usage is desirable anyhow.
    
    Passes toolstash -cmp.
    
    Change-Id: I24f1cb1e6cff0a3afba4ca66f7166874917a036b
    Reviewed-on: https://go-review.googlesource.com/20792Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    65b40204
Name
Last commit
Last update
.github Loading commit data...
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...