diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-10 18:44:32 +0100 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-10 18:50:22 +0100 |
commit | c641ffea3af2ab16c6449574ea865f2ef10a448e (patch) | |
tree | 154bf9b207b11f4c8a1aa399144aa53eebc9d813 /parser/frontmatter_test.go | |
parent | 3ba279c2e5cdb4cbed300c0054b68c334590b7bf (diff) |
absurlreplacer: write replacements directly to the byte buffer
The extra step isn't needed and this makes the code simpler.
And slightly faster:
benchmark old ns/op new ns/op delta
BenchmarkAbsUrl 19987 17498 -12.45%
BenchmarkXmlAbsUrl 10606 9503 -10.40%
benchmark old allocs new allocs delta
BenchmarkAbsUrl 28 24 -14.29%
BenchmarkXmlAbsUrl 14 12 -14.29%
benchmark old bytes new bytes delta
BenchmarkAbsUrl 3512 3297 -6.12%
BenchmarkXmlAbsUrl 2059 1963 -4.66%
Diffstat (limited to 'parser/frontmatter_test.go')
0 files changed, 0 insertions, 0 deletions