-
Josh Bleecher Snyder authored
Instead of always appending to c.Values, choose whichever slice is larger; b.Values will be set to nil anyway. Appending once instead of in a loop also limits slice growth to once per function call and is more efficient. Reduces max rss for the program in #18602 by 6.5%, and eliminates fuseBlockPlain from the alloc_space pprof output. fuseBlockPlain previously accounted for 16.74% of allocated memory. Updates #18602. Change-Id: I417b03722d011a59a679157da43dc91f4425210e Reviewed-on: https://go-review.googlesource.com/35114 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
16e430e1