go/printer: measure lines/construct in generated output rather than incoming source
No change to $GOROOT/src, misc formatting. Nice side-effect: almost 3% faster runs because it's much faster to compute line number differences in the generated output than the incoming source. Benchmark run, best of 5 runs, before and after: BenchmarkPrint 200 12347587 ns/op BenchmarkPrint 200 11999061 ns/op Fixes #4504. LGTM=adonovan R=golang-codereviews, adonovan CC=golang-codereviews https://golang.org/cl/69260045
Showing
Please register or sign in to comment