1. 26 Oct, 2012 3 commits
    • Dave Cheney's avatar
      cmd/5g: peep.c: reactivate some optimisations · 542dd8b9
      Dave Cheney authored
      Thanks to Minux and Remy for their advice.
      
      The EOR optimisation is applied to a few places in the stdlib.
      
      // hash/crc32/crc32.go
      func update(crc uint32, tab *Table, p []byte) uint32 {
      	crc = ^crc
      	for _, v := range p {
              	crc = tab[byte(crc)^v] ^ (crc >> 8)
      	}
      	return ^crc
      }
      
      before:
      
      --- prog list "update" ---
      0164 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:101) TEXT        update+0(SB),$12-24
      0165 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:101) MOVW        tab+4(FP),R8
      0166 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:102) MOVW        crc+0(FP),R0
      0167 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:102) EOR         $-1,R0,R5
      0168 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:103) MOVW        p+8(FP),R0
      0169 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:103) MOVW        R0,autotmp_0019+-12(SP)
      
      after:
      
      --- prog list "update" ---
      0164 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:101) TEXT        update+0(SB),$12-24
      0165 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:101) MOVW        tab+4(FP),R8
      0166 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:102) MOVW        crc+0(FP),R0
      0167 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:102) MVN         R0,R5
      0168 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:103) MOVW        p+8(FP),R0
      0169 (/home/dfc/go/src/pkg/hash/crc32/crc32.go:103) MOVW        R0,autotmp_0019+-12(SP)
      
      After 5l has done its work,
      
              crc = ^crc
         3d710:       e59d0014        ldr     r0, [sp, #20]
         3d714:       e3e0b000        mvn     fp, #0
         3d718:       e020500b        eor     r5, r0, fp
      
      becomes
      
              crc = ^crc
         3d710:       e59d0014        ldr     r0, [sp, #20]
         3d714:       e1e05000        mvn     r5, r0
      
      The MOVB optimisation has a small impact on the stdlib, in strconv
      and gzip.
      
      // GZIP (RFC 1952) is little-endian, unlike ZLIB (RFC 1950).
      func put2(p []byte, v uint16) {
              p[0] = uint8(v >> 0)
              p[1] = uint8(v >> 8)
      }
      
      before:
      
      --- prog list "put2" ---
      1369 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:76) TEXT       put2+0(SB),$0-16
      1370 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:76) MOVHU      v+12(FP),R4
      1371 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVHU      R4,R0
      1372 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVHU      R0,R0
      1373 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVBU      R0,R1
      1374 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVBU      R1,R3
      1375 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVW       $p+0(FP),R1
      
      after:
      
      --- prog list "put2" ---
      1369 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:76) TEXT       put2+0(SB),$0-16
      1370 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:76) MOVHU      v+12(FP),R4
      1371 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVHU      R4,R0
      1372 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVBU      R0,R1
      1373 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVBU      R1,R3
      1374 (/home/dfc/go/src/pkg/compress/gzip/gzip.go:77) MOVW       $p+0(FP),R1
      
      R=remyoudompheng, rsc, minux.ma
      CC=golang-dev
      https://golang.org/cl/6674048
      542dd8b9
    • Rémy Oudompheng's avatar
      reflect: stop thinking that MaxFloat32 overflows float32. · 38070a72
      Rémy Oudompheng authored
      Fixes #4282.
      
      R=golang-dev, minux.ma, rsc
      CC=golang-dev
      https://golang.org/cl/6759052
      38070a72
    • Dmitriy Vyukov's avatar
      runtime: switch to 64-bit goroutine ids · 320df44f
      Dmitriy Vyukov authored
      Fixes #4275.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/6759053
      320df44f
  2. 25 Oct, 2012 4 commits
  3. 24 Oct, 2012 3 commits
  4. 23 Oct, 2012 1 commit
  5. 22 Oct, 2012 15 commits
  6. 21 Oct, 2012 11 commits
  7. 20 Oct, 2012 3 commits
    • Shenghou Ma's avatar
      cmd/go: make package list order predicable · 6a3ad481
      Shenghou Ma authored
      also add a cleanup phase to cmd/go/test.bash.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6741050
      6a3ad481
    • Shenghou Ma's avatar
      codereview: protect against read-only upstream repository · bcdb7926
      Shenghou Ma authored
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6742053
      bcdb7926
    • Shenghou Ma's avatar
      runtime: ~3.7x speed up of div/mod on ARM · 3e3fa7b5
      Shenghou Ma authored
      benchmark                      old ns/op    new ns/op    delta
      BenchmarkUint32Div7                  281           75  -73.06%
      BenchmarkUint32Div37                 281           75  -73.02%
      BenchmarkUint32Div123                281           75  -73.02%
      BenchmarkUint32Div763                280           75  -72.89%
      BenchmarkUint32Div1247               280           75  -72.93%
      BenchmarkUint32Div9305               281           75  -73.02%
      BenchmarkUint32Div13307              281           75  -73.06%
      BenchmarkUint32Div52513              281           75  -72.99%
      BenchmarkUint32Div60978747           281           63  -77.33%
      BenchmarkUint32Div106956295          280           63  -77.21%
      BenchmarkUint32Mod7                  280           77  -72.21%
      BenchmarkUint32Mod37                 280           77  -72.18%
      BenchmarkUint32Mod123                280           77  -72.25%
      BenchmarkUint32Mod763                280           77  -72.18%
      BenchmarkUint32Mod1247               280           77  -72.21%
      BenchmarkUint32Mod9305               280           77  -72.21%
      BenchmarkUint32Mod13307              280           77  -72.25%
      BenchmarkUint32Mod52513              280           77  -72.18%
      BenchmarkUint32Mod60978747           280           63  -77.25%
      BenchmarkUint32Mod106956295          280           63  -77.21%
      
      R=dave, rsc
      CC=dave, golang-dev, rsc
      https://golang.org/cl/6717043
      3e3fa7b5