Adjust splitsize:

benchmark                         old ns/op     new ns/op     delta
BenchmarkEncode10x2x10000-2       243613        229413        -5.83%
BenchmarkEncode100x20x10000-2     23041318      19311104      -16.19%
BenchmarkEncode17x3x1M-2          54469780      49602836      -8.94%
BenchmarkEncode10x4x16M-2         674538600     647037000     -4.08%

Bigger sizes (1024) yeilds slower less speedup.
master
Klaus Post 2015-06-20 20:32:52 +02:00
parent 9f6744582c
commit 437e364842
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ func (r reedSolomon) codeSomeShards(matrixRows, inputs, outputs [][]byte, output
}
// How many bytes per goroutine.
const splitSize = 256
const splitSize = 512
// Perform the same as codeSomeShards, but split the workload into
// several goroutines.