blang/semver — pull request #7 by cbandy (2014-12-18 04:32:04+00:00)
Title: Simplify parsing by using more slices

This also seems to have a positive affect on parse benchmarks. (Shorter strings? Less logic around indices?)

Before:
```
BenchmarkParseSimple 5000000 436 ns/op 49 B/op 1 allocs/op
BenchmarkParseComplex 1000000 2535 ns/op 263 B/op 7 allocs/op
BenchmarkParseAverage 1000000 1562 ns/op 168 B/op 4 allocs/op
BenchmarkValidateSimple 100000000 10.4 ns/op 0 B/op 0 allocs/op
BenchmarkValidateComplex 1000000 1057 ns/op 0 B/op 0 allocs/op
BenchmarkValidateAverage 5000000 527 ns/op 0 B/op 0 allocs/op
BenchmarkCompareSimple 100000000 13.6 ns/op 0 B/op 0 allocs/op
BenchmarkCompareComplex 50000000 48.9 ns/op 0 B/op 0 allocs/op
BenchmarkCompareAverage 50000000 46.9 ns/op 0 B/op 0 allocs/op
BenchmarkSort 5000000 524 ns/op 259 B/op 2 allocs/op
```

After:
```
BenchmarkParseSimple 5000000 377 ns/op 49 B/op 1 allocs/op
BenchmarkParseComplex 1000000 2488 ns/op 264 B/op 7 allocs/op
BenchmarkParseAverage 1000000 1441 ns/op 168 B/op 4 allocs/op
BenchmarkValidateSimple 100000000 10.1 ns/op 0 B/op 0 allocs/op
BenchmarkValidateComplex 2000000 996 ns/op 0 B/op 0 allocs/op
BenchmarkValidateAverage 5000000 490 ns/op 0 B/op 0 allocs/op
BenchmarkCompareSimple 100000000 13.7 ns/op 0 B/op 0 allocs/op
BenchmarkCompareComplex 50000000 48.8 ns/op 0 B/op 0 allocs/op
BenchmarkCompareAverage 50000000 48.2 ns/op 0 B/op 0 allocs/op
BenchmarkSort 5000000 529 ns/op 259 B/op 2 allocs/op
```