]> Cypherpunks repositories - gostls13.git/commit
text/template/parse: use strings.Builder in Chain and List nodes
authorAriel Mashraki <ariel@mashraki.co.il>
Tue, 1 Oct 2019 15:39:29 +0000 (18:39 +0300)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Tue, 1 Oct 2019 19:03:51 +0000 (19:03 +0000)
commit86cd6c2ee5c5e4c5b5edf4ea8d1c85f80d9706a8
treed85294a11881143fb36e2978263b9f5088cb5d95
parent09c9bced825593aedfd79af5c35916392f43113c
text/template/parse: use strings.Builder in Chain and List nodes

This CL is a continuation of 198078. Benchmark output:

benchmark                     old ns/op     new ns/op     delta
BenchmarkParseLarge-8         24759165      24516563      -0.98%
BenchmarkVariableString-8     115           115           +0.00%
BenchmarkListString-8         924           680           -26.41%

benchmark                     old allocs     new allocs     delta
BenchmarkVariableString-8     3              3              +0.00%
BenchmarkListString-8         14             13             -7.14%

benchmark                     old bytes     new bytes     delta
BenchmarkVariableString-8     72            72            +0.00%
BenchmarkListString-8         512           424           -17.19%

Change-Id: I9ec48fe4832437c556a5fa94d4cbf6e29e28d944
Reviewed-on: https://go-review.googlesource.com/c/go/+/198080
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/text/template/parse/node.go
src/text/template/parse/parse_test.go