hugo/parser
Bjørn Erik Pedersen 3d9c4f513b parser: Add BenchmarkFrontmatterTags
The list handling is surprisingly expensive:

```
▶ go test -run="NONE" -bench="BenchmarkFrontmatterTags" -test.benchmem=true ./parser | prettybench
PASS
benchmark                               iter         time/iter   bytes alloc           allocs
---------                               ----         ---------   -----------           ------
BenchmarkFrontmatterTags/JSON:1-4    1000000     2039.00 ns/op      912 B/op     20 allocs/op
BenchmarkFrontmatterTags/JSON:11-4    300000     5202.00 ns/op     1640 B/op     44 allocs/op
BenchmarkFrontmatterTags/JSON:21-4    200000     7993.00 ns/op     2392 B/op     65 allocs/op
BenchmarkFrontmatterTags/YAML:1-4     200000     9359.00 ns/op     5928 B/op     66 allocs/op
BenchmarkFrontmatterTags/YAML:11-4    100000    21218.00 ns/op     8408 B/op    140 allocs/op
BenchmarkFrontmatterTags/YAML:21-4     50000    32852.00 ns/op    10920 B/op    211 allocs/op
BenchmarkFrontmatterTags/TOML:1-4     100000    21505.00 ns/op     9231 B/op    173 allocs/op
BenchmarkFrontmatterTags/TOML:11-4     20000    82919.00 ns/op    19808 B/op    625 allocs/op
BenchmarkFrontmatterTags/TOML:21-4     10000   141847.00 ns/op    31200 B/op   1106 allocs/op
ok      github.com/spf13/hugo/parser    17.890s
```

See #3464
2017-06-03 08:53:56 +02:00
..
frontmatter.go parser: Improve TOML frontmatter parser performance 2017-03-20 09:02:35 +01:00
frontmatter_test.go parser: Add BenchmarkFrontmatterTags 2017-06-03 08:53:56 +02:00
long_text_test.md Merge remote-tracking branch 'origin/parser' into mrg_praser 2013-09-17 15:52:40 -07:00
page.go parser: Accept JSON frontmatter without leading "{\n" 2017-03-13 17:19:03 +01:00
page_test.go parser: Refactor frontmatter parser and add tests 2017-03-11 17:52:25 +01:00
parse_frontmatter_test.go parser: Accept JSON frontmatter without leading "{\n" 2017-03-13 17:19:03 +01:00