cmd/compile: improve efficiency of binary export position encoding
Use -64 instead of 0 as the magic "new file" line delta, since it is much less common. Use a new path encoding that breaks up paths into /-separated components, allowing reuse of the component strings, and making many re-used paths a single byte to encode. Bump the export version to 5. Fixes #20080 name old export-bytes new export-bytes delta Template 19.1k ± 0% 17.4k ± 0% -8.74% (p=0.008 n=5+5) Unicode 4.47k ± 0% 4.42k ± 0% -0.96% (p=0.008 n=5+5) GoTypes 29.9k ± 0% 27.6k ± 0% -7.41% (p=0.008 n=5+5) Compiler 71.4k ± 0% 65.4k ± 0% -8.45% (p=0.008 n=5+5) SSA 67.8k ± 0% 65.6k ± 0% -3.38% (p=0.008 n=5+5) Flate 4.99k ± 0% 4.79k ± 0% -3.91% (p=0.008 n=5+5) GoParser 8.77k ± 0% 7.97k ± 0% -9.14% (p=0.008 n=5+5) Reflect 6.27k ± 0% 6.13k ± 0% -2.22% (p=0.008 n=5+5) Tar 9.46k ± 0% 8.82k ± 0% -6.69% (p=0.008 n=5+5) XML 16.0k ± 0% 14.9k ± 0% -6.69% (p=0.008 n=5+5) [Geo mean] 14.8k 14.0k -5.80% Change-Id: Iea0c8c62e61dbab3cfd14ee121e34845c85f00d2 Reviewed-on: https://go-review.googlesource.com/41619 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Showing