1. 01 Mar, 2011 9 commits
  2. 28 Feb, 2011 7 commits
  3. 26 Feb, 2011 1 commit
    • Nigel Tao's avatar
      compress/lzw: don't use a closure in NewReader, which avoids having · fdbbb066
      Nigel Tao authored
      to move some variables from the stack to the heap.
      
      Sorted benchmark runs on my 2007-era Mac Mini (GOARCH=amd64, GOOS=linux):
      
      Before:
      lzw.BenchmarkDecoder        2000        878176 ns/op
      lzw.BenchmarkDecoder        2000        878415 ns/op
      lzw.BenchmarkDecoder        2000        880352 ns/op
      lzw.BenchmarkDecoder        2000        898445 ns/op
      lzw.BenchmarkDecoder        2000        901728 ns/op
      
      After:
      lzw.BenchmarkDecoder        2000        859065 ns/op
      lzw.BenchmarkDecoder        2000        859402 ns/op
      lzw.BenchmarkDecoder        2000        860035 ns/op
      lzw.BenchmarkDecoder        2000        860555 ns/op
      lzw.BenchmarkDecoder        2000        861109 ns/op
      
      The ratio of before/after median times is 1.024.
      
      The runtime.MemStats.Mallocs delta per loop drops from 109 to 104.
      
      R=r, r2, dfc
      CC=golang-dev
      https://golang.org/cl/4253043
      fdbbb066
  4. 25 Feb, 2011 17 commits
  5. 24 Feb, 2011 6 commits
    • Nigel Tao's avatar
      compress/lzw: implement an encoder. · 741eab4e
      Nigel Tao authored
      R=rsc, nigeltao_gnome
      CC=golang-dev
      https://golang.org/cl/4209043
      741eab4e
    • Russ Cox's avatar
      reflect: add pointer word to CommonType · 8d36a784
      Russ Cox authored
      The pointer will eventually let us find *T given T.
      This CL just makes room for it, always storing a zero.
      
      R=r, r2
      CC=golang-dev
      https://golang.org/cl/4221046
      8d36a784
    • Russ Cox's avatar
      runtime: fix signal stack bug · 820dc9ff
      Russ Cox authored
      In CL 4188061 I changed malg to allocate the requested
      number of bytes n, not n+StackGuard, so that the
      allocations would use rounder numbers.
      
      The allocation of the signal stack asks for 32k and
      then used g->stackguard as the base, but g->stackguard
      is StackGuard bytes above the base.  Previously, asking
      for 32k meant getting 32k+StackGuard bytes, so using
      g->stackguard as the base was safe.  Now, the actual base
      must be computed, so that the signal handler does not
      run StackGuard bytes past the top of the stack.
      
      Was causing flakiness mainly in programs that use the
      network, because they sometimes write to closed network
      connections, causing SIGPIPEs.  Was also causing problems
      in the doc/progs test.
      
      Also fix Makefile so that changes to stack.h trigger rebuild.
      
      R=bradfitzgo, r, r2
      CC=golang-dev
      https://golang.org/cl/4230044
      820dc9ff
    • Russ Cox's avatar
      ld: weak symbols · d94bf762
      Russ Cox authored
      A reference to the address of weak.foo resolves at link time
      to the address of the symbol foo if foo would end up in the
      binary anyway, or to zero if foo would not be in the binary.
      
      For example:
      
              int xxx = 1;
              int yyy = 2;
              int weak·xxx;
              int weak·yyy;
      
              void main·main(void) {
                      runtime·printf("%p %p %p\n", &xxx, &weak·xxx, &weak·yyy);
              }
      
      prints the same non-nil address twice, then 0 (because yyy is not
      referenced so it was dropped from the binary).
      
      This will be used by the reflection tables.
      
      R=iant
      CC=golang-dev
      https://golang.org/cl/4223044
      d94bf762
    • Russ Cox's avatar
      http: remove debugging log statement · 4185a9e2
      Russ Cox authored
      Issue 1547 is fixed.
      
      R=bradfitzgo, r
      CC=golang-dev
      https://golang.org/cl/4209045
      4185a9e2
    • Robert Griesemer's avatar
      godoc: fix writeFileAtomically utility function · c9021a1a
      Robert Griesemer authored
      If the filename was absolute, writeFileAtomically
      used the wrong filename for ioutil.TempFile leading
      to non-existent directories and the TempFile would
      fail.
      
      R=r, r2
      CC=golang-dev
      https://golang.org/cl/4224043
      c9021a1a