Skip to content

Release 5.7

Choose a tag to compare

@deankarn deankarn released this 09 Jun 01:38
· 83 commits to v5 since this release

add ability to use comma and = in params i.e. excludesall=,=
added some struct caching pool to reuse objects, reduce garbage collection and reduce memory allocations.

new benchmarks:

Old Benchmarks
$ go test -cpu=4 -bench=. -benchmem=true
PASS
BenchmarkValidateField-4             5000000           333 ns/op          16 B/op          1 allocs/op
BenchmarkValidateStructSimple-4       500000          2597 ns/op         752 B/op         13 allocs/op
BenchmarkTemplateParallelSimple-4    1000000          1138 ns/op         753 B/op         13 allocs/op
BenchmarkValidateStructLarge-4        100000         14663 ns/op        4806 B/op         78 allocs/op
BenchmarkTemplateParallelLarge-4      200000          7112 ns/op        4810 B/op         78 allocs/op

New Benchmarks
$ go test -cpu=4 -bench=. -benchmem=true
PASS
BenchmarkValidateField-4             5000000           318 ns/op          16 B/op          1 allocs/op
BenchmarkValidateStructSimple-4       500000          2471 ns/op         624 B/op         10 allocs/op
BenchmarkTemplateParallelSimple-4    2000000           975 ns/op         624 B/op         10 allocs/op
BenchmarkValidateStructLarge-4        100000         13979 ns/op        4293 B/op         66 allocs/op
BenchmarkTemplateParallelLarge-4      200000          5947 ns/op        4298 B/op         66 allocs/op