Reuse the BlackFriday instance when possible
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 16 Dec 2017 17:56:58 +0000 (18:56 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 16 Dec 2017 18:44:33 +0000 (19:44 +0100)
commitdb4b7a5c6742c75f9cd9627d3b054d3a72802ec8
treee83c9d409698d159ddb62a512562d7056331714b
parent25114986086e5877a0b4108d8cf5e4e95f377241
Reuse the BlackFriday instance when possible

This is in heavy use in rendering, so this makes a difference:

```bash
benchmark                                                                                    old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     124551144     107743429     -13.49%

benchmark                                                                                    old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     528684         435118         -17.70%

benchmark                                                                                    old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     53306848      45147832      -15.31%
```
helpers/content.go
helpers/content_renderer_test.go
helpers/content_test.go
hugolib/config.go
hugolib/page.go
tpl/transform/transform.go