1
0
mirror of https://github.com/golang/go synced 2024-10-02 12:28:33 -06:00
go/src/pkg/runtime/arch_386.h
Rob Pike f235d5d8d7 runtime: special-case append([]byte, string) for small strings
Also make the crossover point an architecture-dependent constant,
although it's the same everywhere for now.

BenchmarkAppendStr1Byte            416          145  -65.14%
BenchmarkAppendStr4Bytes           743          217  -70.79%
BenchmarkAppendStr8Bytes           421          270  -35.87%
BenchmarkAppendStr16Bytes          415          403   -2.89%
BenchmarkAppendStr32Bytes          415          391   -5.78%

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7459044
2013-03-01 16:41:39 -08:00

7 lines
85 B
C

enum {
thechar = '8',
BigEndian = 0,
CacheLineSize = 64,
appendCrossover = 16
};