Skip to content

Commit

Permalink
Merge branch 'minor-perf-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
joeybloggs authored and joeybloggs committed Jul 3, 2016
2 parents 762ce96 + 60fc727 commit 0edc04f
Show file tree
Hide file tree
Showing 9 changed files with 295 additions and 199 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,26 +268,26 @@ NOTE: the 1 allocation and B/op in the first 4 decodes is actually the struct al
go test -bench=. -benchmem=true

PASS
BenchmarkSimpleUserDecodeStruct-8 5000000 299 ns/op 64 B/op 1 allocs/op
BenchmarkSimpleUserDecodeStructParallel-8 20000000 106 ns/op 64 B/op 1 allocs/op
BenchmarkSimpleUserEncodeStruct-8 2000000 825 ns/op 466 B/op 7 allocs/op
BenchmarkSimpleUserEncodeStructParallel-8 5000000 301 ns/op 466 B/op 7 allocs/op
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8 2000000 901 ns/op 96 B/op 1 allocs/op
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8 5000000 283 ns/op 96 B/op 1 allocs/op
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8 300000 4302 ns/op 2912 B/op 32 allocs/op
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8 1000000 1542 ns/op 2913 B/op 32 allocs/op
BenchmarkComplexArrayDecodeStructAllTypes-8 100000 18125 ns/op 2730 B/op 135 allocs/op
BenchmarkComplexArrayDecodeStructAllTypesParallel-8 300000 6178 ns/op 2734 B/op 135 allocs/op
BenchmarkComplexArrayEncodeStructAllTypes-8 100000 17738 ns/op 7190 B/op 154 allocs/op
BenchmarkComplexArrayEncodeStructAllTypesParallel-8 300000 5360 ns/op 7192 B/op 154 allocs/op
BenchmarkComplexMapDecodeStructAllTypes-8 50000 28476 ns/op 7567 B/op 163 allocs/op
BenchmarkComplexMapDecodeStructAllTypesParallel-8 200000 9849 ns/op 7604 B/op 163 allocs/op
BenchmarkComplexMapEncodeStructAllTypes-8 100000 18424 ns/op 7097 B/op 177 allocs/op
BenchmarkComplexMapEncodeStructAllTypesParallel-8 300000 5852 ns/op 7096 B/op 177 allocs/op
BenchmarkDecodeNestedStruct-8 200000 5199 ns/op 1040 B/op 31 allocs/op
BenchmarkDecodeNestedStructParallel-8 1000000 1713 ns/op 1040 B/op 31 allocs/op
BenchmarkEncodeNestedStruct-8 500000 3025 ns/op 848 B/op 26 allocs/op
BenchmarkEncodeNestedStructParallel-8 1000000 1096 ns/op 848 B/op 26 allocs/op
BenchmarkSimpleUserDecodeStruct-8 5000000 319 ns/op 64 B/op 1 allocs/op
BenchmarkSimpleUserDecodeStructParallel-8 20000000 116 ns/op 64 B/op 1 allocs/op
BenchmarkSimpleUserEncodeStruct-8 1000000 1015 ns/op 549 B/op 12 allocs/op
BenchmarkSimpleUserEncodeStructParallel-8 5000000 411 ns/op 549 B/op 12 allocs/op
BenchmarkPrimitivesDecodeStructAllPrimitivesTypes-8 1000000 1038 ns/op 96 B/op 1 allocs/op
BenchmarkPrimitivesDecodeStructAllPrimitivesTypesParallel-8 5000000 368 ns/op 96 B/op 1 allocs/op
BenchmarkPrimitivesEncodeStructAllPrimitivesTypes-8 200000 5014 ns/op 3073 B/op 47 allocs/op
BenchmarkPrimitivesEncodeStructAllPrimitivesTypesParallel-8 1000000 1973 ns/op 3072 B/op 47 allocs/op
BenchmarkComplexArrayDecodeStructAllTypes-8 100000 17656 ns/op 2515 B/op 123 allocs/op
BenchmarkComplexArrayDecodeStructAllTypesParallel-8 300000 5801 ns/op 2518 B/op 123 allocs/op
BenchmarkComplexArrayEncodeStructAllTypes-8 100000 16318 ns/op 7351 B/op 147 allocs/op
BenchmarkComplexArrayEncodeStructAllTypesParallel-8 300000 5955 ns/op 7351 B/op 147 allocs/op
BenchmarkComplexMapDecodeStructAllTypes-8 50000 25196 ns/op 7089 B/op 135 allocs/op
BenchmarkComplexMapDecodeStructAllTypesParallel-8 200000 9443 ns/op 7123 B/op 135 allocs/op
BenchmarkComplexMapEncodeStructAllTypes-8 100000 17061 ns/op 7162 B/op 176 allocs/op
BenchmarkComplexMapEncodeStructAllTypesParallel-8 300000 6375 ns/op 7160 B/op 176 allocs/op
BenchmarkDecodeNestedStruct-8 300000 4102 ns/op 640 B/op 16 allocs/op
BenchmarkDecodeNestedStructParallel-8 1000000 1399 ns/op 640 B/op 16 allocs/op
BenchmarkEncodeNestedStruct-8 500000 2440 ns/op 768 B/op 17 allocs/op
BenchmarkEncodeNestedStructParallel-8 2000000 1045 ns/op 768 B/op 17 allocs/op
```

Competitor benchmarks can be found [here](https://github.com/go-playground/form/blob/master/benchmarks/benchmarks.md)
Expand Down
Loading

0 comments on commit 0edc04f

Please sign in to comment.