]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: tune appendCrossover for arm
authorDave Cheney <dave@cheney.net>
Sat, 27 Apr 2013 14:18:11 +0000 (00:18 +1000)
committerDave Cheney <dave@cheney.net>
Sat, 27 Apr 2013 14:18:11 +0000 (00:18 +1000)
Turns out the optimal value is 8 on cortex-A9 systems (pandaboard)

benchmark                     old ns/op    new ns/op    delta
BenchmarkAppend                     907          908   +0.11%
BenchmarkAppend1Byte                101          101   +0.00%
BenchmarkAppend4Bytes               116          116   +0.00%
BenchmarkAppend8Bytes               139          138   -0.72%
BenchmarkAppend16Bytes              185          158  -14.59%
BenchmarkAppend32Bytes              131          131   +0.00%
BenchmarkAppendStr1Byte              72           72   +0.00%
BenchmarkAppendStr4Bytes             93           93   -0.21%
BenchmarkAppendStr8Bytes            116          116   +0.00%
BenchmarkAppendStr16Bytes           161          125  -22.36%
BenchmarkAppendStr32Bytes           102          102   +0.00%
BenchmarkAppendSpecialCase          613          613   +0.00%

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8863045

src/pkg/runtime/arch_arm.h

index bb65d3faf10414d24a5109af24fe50dd2b0e0214..27c70c1052731961440fff02b1f5344ac8553bab 100644 (file)
@@ -6,5 +6,5 @@ enum {
        thechar = '5',
        BigEndian = 0,
        CacheLineSize = 32,
-       appendCrossover = 16
+       appendCrossover = 8
 };