Use buffer pool in StripHTML
authorbep <bjorn.erik.pedersen@gmail.com>
Fri, 6 Feb 2015 14:35:45 +0000 (15:35 +0100)
committerbep <bjorn.erik.pedersen@gmail.com>
Fri, 6 Feb 2015 14:35:45 +0000 (15:35 +0100)
commit08219161dd48d952085dd2e421dc7b005319684c
tree3bcfa4fe36b38c60c9bdd29a587b3774a4f8932d
parent5e34ae6199da8a579a0e5589483172e140217cc7
Use buffer pool in StripHTML

Allocates less memory:

benchmark              old ns/op     new ns/op     delta
BenchmarkStripHTML     6572          6695          +1.87%

benchmark              old allocs     new allocs     delta
BenchmarkStripHTML     5              4              -20.00%

benchmark              old bytes     new bytes     delta
BenchmarkStripHTML     848           737           -13.09%

Compared to 0.12:

benchmark              old ns/op     new ns/op     delta
BenchmarkStripHTML     10210         6695          -34.43%

benchmark              old allocs     new allocs     delta
BenchmarkStripHTML     6              4              -33.33%

benchmark              old bytes     new bytes     delta
BenchmarkStripHTML     1456          737           -49.38%
helpers/content.go