mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
f5ed04bd4a
To make sure a cached partial is ony executed exactly once. Performance same: ```bash name old time/op new time/op delta TemplateParamsKeysToLower-4 17.2µs ± 0% 16.5µs ± 0% ~ (p=1.000 n=1+1) Partial-4 18.6µs ± 0% 19.4µs ± 0% ~ (p=1.000 n=1+1) PartialCached-4 64.2ns ± 0% 63.7ns ± 0% ~ (p=1.000 n=1+1) name old alloc/op new alloc/op delta TemplateParamsKeysToLower-4 2.66kB ± 0% 2.66kB ± 0% ~ (all equal) Partial-4 1.31kB ± 0% 1.31kB ± 0% ~ (all equal) PartialCached-4 0.00B 0.00B ~ (all equal) name old allocs/op new allocs/op delta TemplateParamsKeysToLower-4 92.0 ± 0% 92.0 ± 0% ~ (all equal) Partial-4 41.0 ± 0% 41.0 ± 0% ~ (all equal) ``` |
||
---|---|---|
.. | ||
cast | ||
collections | ||
compare | ||
crypto | ||
data | ||
encoding | ||
fmt | ||
images | ||
inflect | ||
internal | ||
lang | ||
math | ||
os | ||
partials | ||
safe | ||
strings | ||
time | ||
tplimpl | ||
transform | ||
urls | ||
template.go |