]> Cypherpunks repositories - gostls13.git/commit
encoding/pem: eliminate allocations for newlines during encoding
authorBen Burkert <ben@benburkert.com>
Sun, 21 Dec 2014 21:31:23 +0000 (13:31 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 21 Dec 2014 22:06:09 +0000 (22:06 +0000)
commite4c2229e4c174a258499bde8f8f2729a4afc4c96
treeaac582bf6aff3b2d92f618a2a8c6caacd92362ad
parentf34964ed344d67d9370bb96060b9c1406d344fc2
encoding/pem: eliminate allocations for newlines during encoding

benchmark           old MB/s     new MB/s     speedup
BenchmarkEncode     243.20       279.89       1.15x

benchmark           old allocs     new allocs     delta
BenchmarkEncode     1370           4              -99.71%

Change-Id: I3920bcc04b6dd89efa5da89db5594d4434426d74
Reviewed-on: https://go-review.googlesource.com/1924
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/encoding/pem/pem.go
src/encoding/pem/pem_test.go