hugo/markup/highlight
Cameron Moore 14bce18a6c highlight: Avoid making unnecessary allocation
Avoid creating a local copy of the highlight configuration when no
options are passed.

Benchmarks of building the docs site:

name        old time/op    new time/op    delta
DocsSite-2     1.94s ± 4%     1.93s ± 4%    ~     (p=0.841 n=5+5)

name        old alloc/op   new alloc/op   delta
DocsSite-2     666MB ± 1%     656MB ± 0%  -1.48%  (p=0.008 n=5+5)

name        old allocs/op  new allocs/op  delta
DocsSite-2     8.85M ± 0%     8.76M ± 0%  -1.04%  (p=0.029 n=4+4)
2020-10-16 21:14:02 +02:00
..
config.go markup/highlight: Add support to linkable line anchors on Chroma 2020-09-13 11:00:16 +02:00
config_test.go Add Goldmark as the new default markdown handler 2019-11-23 14:12:24 +01:00
highlight.go highlight: Avoid making unnecessary allocation 2020-10-16 21:14:02 +02:00
highlight_test.go markup/highlight: Add support to linkable line anchors on Chroma 2020-09-13 11:00:16 +02:00