mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-25 21:21:22 +03:00
![]() ```` │ stash.bench │ perf-v146.bench │ │ sec/op │ sec/op vs base │ LookupPartial-10 248.00n ± 0% 14.75n ± 2% -94.05% (p=0.002 n=6) │ stash.bench │ perf-v146.bench │ │ B/op │ B/op vs base │ LookupPartial-10 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.002 n=6) │ stash.bench │ perf-v146.bench │ │ allocs/op │ allocs/op vs base │ LookupPartial-10 3.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6) ``` THe speedup above assumes reuse of the same partials over and over again, which I think is not uncommon. This commits also adds some more lookup benchmarks. The current output of these on my MacBook looks decent: ``` BenchmarkLookupPagesLayout/Single_root-10 3031562 395.5 ns/op 0 B/op 0 allocs/op BenchmarkLookupPagesLayout/Single_sub_folder-10 2515915 480.9 ns/op 0 B/op 0 allocs/op BenchmarkLookupPartial-10 84808112 14.13 ns/op 0 B/op 0 allocs/op BenchmarkLookupShortcode/toplevelpage-10 8111779 148.2 ns/op 0 B/op 0 allocs/op BenchmarkLookupShortcode/nestedpage-10 8088183 148.6 ns/op 0 B/op 0 allocs/op ``` Note that in the above the partial lookups are cahced, the others not (they are harder to cache because of the page path). Closes #13571 |
||
---|---|---|
.. | ||
page_generate | ||
pagemeta | ||
siteidentities | ||
page.go | ||
page_author.go | ||
page_data.go | ||
page_data_test.go | ||
page_integration_test.go | ||
page_kinds.go | ||
page_lazy_contentprovider.go | ||
page_markup.go | ||
page_markup_integration_test.go | ||
page_markup_test.go | ||
page_marshaljson.autogen.go | ||
page_matcher.go | ||
page_matcher_test.go | ||
page_nop.go | ||
page_outputformat.go | ||
page_paths.go | ||
page_wrappers.autogen.go | ||
pagegroup.go | ||
pagegroup_test.go | ||
pages.go | ||
pages_cache.go | ||
pages_cache_test.go | ||
pages_language_merge.go | ||
pages_prev_next.go | ||
pages_prev_next_integration_test.go | ||
pages_prev_next_test.go | ||
pages_related.go | ||
pages_related_test.go | ||
pages_sort.go | ||
pages_sort_search.go | ||
pages_sort_search_test.go | ||
pages_sort_test.go | ||
pages_test.go | ||
pagination.go | ||
pagination_test.go | ||
path_integration_test.go | ||
permalinks.go | ||
permalinks_integration_test.go | ||
permalinks_test.go | ||
site.go | ||
site_integration_test.go | ||
taxonomy.go | ||
taxonomy_integration_test.go | ||
testhelpers_test.go | ||
weighted.go | ||
zero_file.autogen.go |