Releases: bmf-san/goblin
Releases · bmf-san/goblin
6.2.0
6.1.0
6.0.2
What's Changed
- Use sync.Pool for parameters by @bmf-san in #77
- Minor refactoring by @bmf-san in #78
- Update readme for adding text for benchmarks by @bmf-san in #79
Full Changelog: 6.0.1...6.0.2
Before(6.0.1)
go test -bench=. -cpu=1 -benchmem -count=1
goos: darwin
goarch: amd64
pkg: github.com/bmf-san/goblin
cpu: VirtualApple @ 2.50GHz
BenchmarkStatic1 10107390 122.5 ns/op 32 B/op 1 allocs/op
BenchmarkStatic5 4572193 261.5 ns/op 96 B/op 1 allocs/op
BenchmarkStatic10 2731324 427.8 ns/op 176 B/op 1 allocs/op
BenchmarkWildCard1 1853865 637.5 ns/op 384 B/op 6 allocs/op
BenchmarkWildCard5 498807 2405 ns/op 928 B/op 13 allocs/op
BenchmarkWildCard10 266755 4524 ns/op 1560 B/op 19 allocs/op
BenchmarkRegexp1 1978497 609.1 ns/op 384 B/op 6 allocs/op
BenchmarkRegexp5 542066 2292 ns/op 928 B/op 13 allocs/op
BenchmarkRegexp10 295821 4331 ns/op 1560 B/op 19 allocs/op
PASS
ok github.com/bmf-san/goblin 13.678s
After(6.0.2)
go test -bench=. -cpu=1 -benchmem -count=1
goos: darwin
goarch: amd64
pkg: github.com/bmf-san/goblin
cpu: VirtualApple @ 2.50GHz
BenchmarkStatic1 10289266 118.9 ns/op 32 B/op 1 allocs/op
BenchmarkStatic5 4732064 254.9 ns/op 96 B/op 1 allocs/op
BenchmarkStatic10 2782759 427.8 ns/op 176 B/op 1 allocs/op
BenchmarkWildCard1 2061339 576.9 ns/op 352 B/op 5 allocs/op
BenchmarkWildCard5 552709 2047 ns/op 559 B/op 9 allocs/op
BenchmarkWildCard10 314959 3627 ns/op 807 B/op 14 allocs/op
BenchmarkRegexp1 2064537 574.7 ns/op 352 B/op 5 allocs/op
BenchmarkRegexp5 624290 2035 ns/op 559 B/op 9 allocs/op
BenchmarkRegexp10 345901 3616 ns/op 771 B/op 14 allocs/op
PASS
ok github.com/bmf-san/goblin 13.524s
6.0.1
6.0.0
Description
- Mainly improved performance
- End of support for go1.15 as a breaking change
Benchmark comparison between 5.4.0 and 6.0.0
Benchmark
5.4.0
goos: darwin
goarch: amd64
pkg: github.com/bmf-san/goblin
cpu: VirtualApple @ 2.50GHz
BenchmarkStatic1-8 14049327 82.37 ns/op 128 B/op 4 allocs/op
BenchmarkStatic5-8 6234420 195.8 ns/op 384 B/op 6 allocs/op
BenchmarkStatic10-8 3591472 335.7 ns/op 720 B/op 7 allocs/op
BenchmarkWildCard1-8 4217578 279.7 ns/op 468 B/op 9 allocs/op
BenchmarkWildCard5-8 1445695 840.7 ns/op 1049 B/op 23 allocs/op
BenchmarkWildCard10-8 831021 1458 ns/op 1737 B/op 35 allocs/op
BenchmarkRegexp1-8 4226604 282.7 ns/op 469 B/op 9 allocs/op
BenchmarkRegexp5-8 1428550 826.7 ns/op 1048 B/op 23 allocs/op
BenchmarkRegexp10-8 885196 1459 ns/op 1736 B/op 35 allocs/op
PASS
ok github.com/bmf-san/goblin 14.504s
6.0.0
goos: darwin
goarch: amd64
pkg: github.com/bmf-san/goblin
cpu: VirtualApple @ 2.50GHz
BenchmarkStatic1-8 37823017 30.31 ns/op 32 B/op 1 allocs/op
BenchmarkStatic5-8 16509595 72.04 ns/op 96 B/op 1 allocs/op
BenchmarkStatic10-8 9619684 127.3 ns/op 176 B/op 1 allocs/op
BenchmarkWildCard1-8 4680534 248.2 ns/op 395 B/op 6 allocs/op
BenchmarkWildCard5-8 1599696 744.7 ns/op 961 B/op 13 allocs/op
BenchmarkWildCard10-8 910838 1340 ns/op 1611 B/op 19 allocs/op
BenchmarkRegexp1-8 5017092 238.7 ns/op 395 B/op 6 allocs/op
BenchmarkRegexp5-8 1620951 744.3 ns/op 956 B/op 13 allocs/op
BenchmarkRegexp10-8 989516 1334 ns/op 1614 B/op 19 allocs/op
PASS
ok github.com/bmf-san/goblin 14.654s
Benchstat
name old time/op new time/op delta
Static1-8 82.4ns ± 0% 30.3ns ± 0% ~ (p=1.000 n=1+1)
Static5-8 196ns ± 0% 72ns ± 0% ~ (p=1.000 n=1+1)
Static10-8 336ns ± 0% 127ns ± 0% ~ (p=1.000 n=1+1)
WildCard1-8 280ns ± 0% 248ns ± 0% ~ (p=1.000 n=1+1)
WildCard5-8 841ns ± 0% 745ns ± 0% ~ (p=1.000 n=1+1)
WildCard10-8 1.46µs ± 0% 1.34µs ± 0% ~ (p=1.000 n=1+1)
Regexp1-8 283ns ± 0% 239ns ± 0% ~ (p=1.000 n=1+1)
Regexp5-8 827ns ± 0% 744ns ± 0% ~ (p=1.000 n=1+1)
Regexp10-8 1.46µs ± 0% 1.33µs ± 0% ~ (p=1.000 n=1+1)
name old alloc/op new alloc/op delta
Static1-8 128B ± 0% 32B ± 0% ~ (p=1.000 n=1+1)
Static5-8 384B ± 0% 96B ± 0% ~ (p=1.000 n=1+1)
Static10-8 720B ± 0% 176B ± 0% ~ (p=1.000 n=1+1)
WildCard1-8 468B ± 0% 395B ± 0% ~ (p=1.000 n=1+1)
WildCard5-8 1.05kB ± 0% 0.96kB ± 0% ~ (p=1.000 n=1+1)
WildCard10-8 1.74kB ± 0% 1.61kB ± 0% ~ (p=1.000 n=1+1)
Regexp1-8 469B ± 0% 395B ± 0% ~ (p=1.000 n=1+1)
Regexp5-8 1.05kB ± 0% 0.96kB ± 0% ~ (p=1.000 n=1+1)
Regexp10-8 1.74kB ± 0% 1.61kB ± 0% ~ (p=1.000 n=1+1)
name old allocs/op new allocs/op delta
Static1-8 4.00 ± 0% 1.00 ± 0% ~ (p=1.000 n=1+1)
Static5-8 6.00 ± 0% 1.00 ± 0% ~ (p=1.000 n=1+1)
Static10-8 7.00 ± 0% 1.00 ± 0% ~ (p=1.000 n=1+1)
WildCard1-8 9.00 ± 0% 6.00 ± 0% ~ (p=1.000 n=1+1)
WildCard5-8 23.0 ± 0% 13.0 ± 0% ~ (p=1.000 n=1+1)
WildCard10-8 35.0 ± 0% 19.0 ± 0% ~ (p=1.000 n=1+1)
Regexp1-8 9.00 ± 0% 6.00 ± 0% ~ (p=1.000 n=1+1)
Regexp5-8 23.0 ± 0% 13.0 ± 0% ~ (p=1.000 n=1+1)
Regexp10-8 35.0 ± 0% 19.0 ± 0% ~ (p=1.000 n=1+1)
What's Changed
- Reduce the memory allocation by refactoring explodePath method by @bmf-san in #68
- Reduce the memory allocation by refactoring newResult method by @bmf-san in #69
- Lint bench_test.go by @bmf-san in #71
- Add some go lint tools by @bmf-san in #72
- [update] stopped using pointers for params by @bmf-san in #73
- Refactoring router receiver by @bmf-san in #74
Full Changelog: 5.4.0...6.0.0
5.4.0
Description
The handling of paths has changed with the introduction of cleanpath.
This method is the same as implemented in net/http.
See #67 for details.
What's Changed
- Add a dependabot.yml by @bmf-san in #65
- fix missing bracket in README by @fox20431 in #66
- Add a cleanpath method by @bmf-san in #67
New Contributors
- @fox20431 made their first contribution in #66
Full Changelog: 5.3.0...5.4.0