1. 07 Jan, 2014 1 commit
    • Russ Cox's avatar
      cmd/gc: use 100x less memory for []byte("string") · d227d680
      Russ Cox authored
      []byte("string") was simplifying to
      []byte{0: 0x73, 1: 0x74, 2: 0x72, 3: 0x69, 4: 0x6e, 5: 0x67},
      but that latter form takes up much more memory in the compiler.
      Preserve the string form and recognize it to turn global variables
      initialized this way into linker-initialized data.
      
      Reduces the compiler memory footprint for a large []byte initialized
      this way from approximately 10 kB/B to under 100 B/B.
      
      See also issue 6643.
      
      R=golang-codereviews, r, iant, oleku.konko, dave, gobot, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/15930045
      d227d680
  2. 06 Jan, 2014 12 commits
  3. 05 Jan, 2014 1 commit
    • Joel Sing's avatar
      crypto/sha1, crypto/sha256, crypto/sha512: use copy for partial block · 29fe067b
      Joel Sing authored
      Use copy rather than a hand rolled loop when moving a partial input
      block to the scratch area. This results in a reasonable performance
      gain when partial blocks are written.
      
      Benchmarks on Intel(R) Xeon(R) CPU X5650  @ 2.67GHz with Go amd64:
      
             benchmark               old MB/s     new MB/s  speedup
      SHA1   BenchmarkHash8Bytes        18.37        22.80    1.24x
      SHA256 BenchmarkHash8Bytes        11.86        13.78    1.16x
      SHA512 BenchmarkHash8Bytes         4.51         5.24    1.16x
      
             benchmark              old ns/op    new ns/op    delta
      SHA1   BenchmarkHash8Bytes          435          350  -19.54%
      SHA256 BenchmarkHash8Bytes          674          580  -13.95%
      SHA512 BenchmarkHash8Bytes         1772         1526  -13.88%
      
      R=agl, dave, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/35840044
      29fe067b
  4. 04 Jan, 2014 5 commits
  5. 03 Jan, 2014 5 commits
  6. 02 Jan, 2014 5 commits
  7. 01 Jan, 2014 5 commits
  8. 31 Dec, 2013 6 commits