• Matthew Dempsky's avatar
    cmd/compile: lazily initialize litbuf · 8d075bee
    Matthew Dempsky authored
    Instead of eagerly creating strings like "literal 2.01" for every
    lexed number in case we need to mention it in an error message, defer
    this work to (*parser).syntax_error.
    
    name      old allocs/op  new allocs/op  delta
    Template      482k ± 0%      482k ± 0%  -0.12%   (p=0.000 n=9+10)
    GoTypes      1.35M ± 0%     1.35M ± 0%  -0.04%  (p=0.015 n=10+10)
    Compiler     5.45M ± 0%     5.44M ± 0%  -0.12%    (p=0.000 n=9+8)
    
    Change-Id: I333b3c80e583864914412fb38f8c0b7f1d8c8821
    Reviewed-on: https://go-review.googlesource.com/22480
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    8d075bee
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...