]> Cypherpunks repositories - gostls13.git/commit
go/constant: share the empty string
authorAlan Donovan <adonovan@google.com>
Mon, 15 Aug 2022 17:05:01 +0000 (13:05 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 15 Aug 2022 17:42:12 +0000 (17:42 +0000)
commit1f833e4a1bfd77c2dfa91305f90ade9f9ceb66de
treeee483f2768f5cd9bb3f1a961c996e9c05e28fcfd
parentc8000a18d688f65ad229c48a0e8a82435943eb6a
go/constant: share the empty string

This saves 11,000 allocations when loading the standard library
in golang.org/x/tools/go/ssa form.

Change-Id: I8aa32b0641c1a3dde29e6ee76c760006035dd56d
Reviewed-on: https://go-review.googlesource.com/c/go/+/423934
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
src/go/constant/value.go