From 437e364842abbed59cd4edf174e75d072cddf658 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Sat, 20 Jun 2015 20:32:52 +0200 Subject: [PATCH] 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. --- reedsolomon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reedsolomon.go b/reedsolomon.go index 5266b37..1e473b8 100644 --- a/reedsolomon.go +++ b/reedsolomon.go @@ -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.