parser: Tune stringifyMapKeys
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 12 Feb 2018 16:39:11 +0000 (17:39 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 12 Feb 2018 18:14:02 +0000 (19:14 +0100)
commit10a917dfdce8851666c5b89ebc02af6f6c84ab59
tree6c89d369f612f12b5e6156d909ff392152f62680
parentd4beef0d2bb8f6481fa80e1d938454a7d4e38814
parser: Tune stringifyMapKeys

```bash
benchmark                                               old ns/op     new ns/op     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     3269          3053          -6.61%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        4.79          5.23          +9.19%
BenchmarkStringifyMapKeysIntegers-4                     2707          2320          -14.30%

benchmark                                               old allocs     new allocs     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     16             6              -62.50%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        0              0              +0.00%
BenchmarkStringifyMapKeysIntegers-4                     16             6              -62.50%

benchmark                                               old bytes     new bytes     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     1080          1008          -6.67%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        0             0             +0.00%
BenchmarkStringifyMapKeysIntegers-4                     1080          1008          -6.67%
```
parser/frontmatter.go
parser/frontmatter_test.go