Skip to content

Commit 55f9e44

Browse files
joeybloggsjoeybloggs
authored andcommitted
Update benchmarks for new go 1.5!
1 parent 15fdf82 commit 55f9e44

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -187,29 +187,35 @@ func ValidateValuer(field reflect.Value) interface{} {
187187

188188
Benchmarks
189189
------
190-
###### Run on MacBook Pro (Retina, 15-inch, Late 2013) 2.6 GHz Intel Core i7 16 GB 1600 MHz DDR3
191-
NOTE: allocations for structs are up from v5, however ns/op for parallel operations are way down.
192-
It was a decicion not to cache struct info because although it reduced allocation to v5 levels, it
193-
hurt parallel performance too much.
190+
###### Run on MacBook Pro (Retina, 15-inch, Late 2013) 2.6 GHz Intel Core i7 16 GB 1600 MHz DDR3 using Go 1.5
194191
```go
195-
go test -cpu=4 -bench=. -benchmem=true
196192
PASS
197-
BenchmarkFieldSuccess-4 5000000 332 ns/op 16 B/op 1 allocs/op
198-
BenchmarkFieldFailure-4 5000000 334 ns/op 16 B/op 1 allocs/op
199-
BenchmarkFieldCustomTypeSuccess-4 3000000 502 ns/op 32 B/op 2 allocs/op
200-
BenchmarkFieldCustomTypeFailure-4 2000000 833 ns/op 416 B/op 6 allocs/op
201-
BenchmarkFieldOrTagSuccess-4 500000 2520 ns/op 20 B/op 2 allocs/op
202-
BenchmarkFieldOrTagFailure-4 1000000 1310 ns/op 384 B/op 6 allocs/op
203-
BenchmarkStructSimpleSuccess-4 1000000 1274 ns/op 24 B/op 3 allocs/op
204-
BenchmarkStructSimpleFailure-4 1000000 1887 ns/op 529 B/op 11 allocs/op
205-
BenchmarkStructSimpleCustomTypeSuccess-4 1000000 1374 ns/op 56 B/op 5 allocs/op
206-
BenchmarkStructSimpleCustomTypeFailure-4 1000000 1871 ns/op 577 B/op 13 allocs/op
207-
BenchmarkStructSimpleSuccessParallel-4 5000000 353 ns/op 24 B/op 3 allocs/op
208-
BenchmarkStructSimpleFailureParallel-4 2000000 799 ns/op 529 B/op 11 allocs/op
209-
BenchmarkStructComplexSuccess-4 200000 7521 ns/op 368 B/op 30 allocs/op
210-
BenchmarkStructComplexFailure-4 100000 12341 ns/op 2861 B/op 72 allocs/op
211-
BenchmarkStructComplexSuccessParallel-4 1000000 2463 ns/op 368 B/op 30 allocs/op
212-
BenchmarkStructComplexFailureParallel-4 300000 5141 ns/op 2862 B/op 72 allocs/op
193+
BenchmarkFieldSuccess-4 5000000 290 ns/op 16 B/op 1 allocs/op
194+
BenchmarkFieldFailure-4 5000000 286 ns/op 16 B/op 1 allocs/op
195+
BenchmarkFieldDiveSuccess-4 500000 2497 ns/op 384 B/op 19 allocs/op
196+
BenchmarkFieldDiveFailure-4 500000 3022 ns/op 752 B/op 23 allocs/op
197+
BenchmarkFieldCustomTypeSuccess-4 3000000 446 ns/op 32 B/op 2 allocs/op
198+
BenchmarkFieldCustomTypeFailure-4 2000000 778 ns/op 416 B/op 6 allocs/op
199+
BenchmarkFieldOrTagSuccess-4 1000000 1287 ns/op 32 B/op 2 allocs/op
200+
BenchmarkFieldOrTagFailure-4 1000000 1125 ns/op 400 B/op 6 allocs/op
201+
BenchmarkStructSimpleCustomTypeSuccess-4 1000000 1225 ns/op 80 B/op 5 allocs/op
202+
BenchmarkStructSimpleCustomTypeFailure-4 1000000 1742 ns/op 608 B/op 13 allocs/op
203+
BenchmarkStructPartialSuccess-4 1000000 1304 ns/op 400 B/op 11 allocs/op
204+
BenchmarkStructPartialFailure-4 1000000 1818 ns/op 784 B/op 16 allocs/op
205+
BenchmarkStructExceptSuccess-4 2000000 869 ns/op 368 B/op 9 allocs/op
206+
BenchmarkStructExceptFailure-4 1000000 1308 ns/op 400 B/op 11 allocs/op
207+
BenchmarkStructSimpleCrossFieldSuccess-4 2000000 973 ns/op 128 B/op 6 allocs/op
208+
BenchmarkStructSimpleCrossFieldFailure-4 1000000 1519 ns/op 528 B/op 11 allocs/op
209+
BenchmarkStructSimpleCrossStructCrossFieldSuccess-4 1000000 1382 ns/op 160 B/op 8 allocs/op
210+
BenchmarkStructSimpleCrossStructCrossFieldFailure-4 1000000 1931 ns/op 560 B/op 13 allocs/op
211+
BenchmarkStructSimpleSuccess-4 1000000 1132 ns/op 48 B/op 3 allocs/op
212+
BenchmarkStructSimpleFailure-4 1000000 1735 ns/op 560 B/op 11 allocs/op
213+
BenchmarkStructSimpleSuccessParallel-4 3000000 363 ns/op 48 B/op 3 allocs/op
214+
BenchmarkStructSimpleFailureParallel-4 2000000 705 ns/op 560 B/op 11 allocs/op
215+
BenchmarkStructComplexSuccess-4 200000 6935 ns/op 432 B/op 27 allocs/op
216+
BenchmarkStructComplexFailure-4 200000 11059 ns/op 2920 B/op 69 allocs/op
217+
BenchmarkStructComplexSuccessParallel-4 1000000 2220 ns/op 432 B/op 27 allocs/op
218+
BenchmarkStructComplexFailureParallel-4 300000 4739 ns/op 2920 B/op 69 allocs/op
213219
```
214220

215221
How to Contribute

0 commit comments

Comments
 (0)