1. 30 May, 2012 11 commits
    • Joel Sing's avatar
      cmd/ld: increase number of ELF sections · 586b6dfa
      Joel Sing authored
      On NetBSD a cgo enabled binary has more than 32 sections - bump NSECTS
      so that we can actually link them successfully.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/6261052
      586b6dfa
    • Jan Ziak's avatar
      runtime: hide symbol table from garbage collector · 46d7d5fc
      Jan Ziak authored
      R=rsc
      CC=golang-dev
      https://golang.org/cl/6243059
      46d7d5fc
    • Marcel van Lohuizen's avatar
    • Russ Cox's avatar
      test/bench/go1: add mandelbrot for floating point · cb9759d0
      Russ Cox authored
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6244063
      cb9759d0
    • Russ Cox's avatar
      cmd/6g: change sbop swap logic · de96df1b
      Russ Cox authored
      I added the nl->op == OLITERAL case during the recent
      performance round, and while it helps for small integer constants,
      it hurts for floating point constants.  In the Mandelbrot benchmark
      it causes 2*Zr*Zi to compile like Zr*2*Zi:
      
              0x000000000042663d <+249>:	movsd  %xmm6,%xmm0
              0x0000000000426641 <+253>:	movsd  $2,%xmm1
              0x000000000042664a <+262>:	mulsd  %xmm1,%xmm0
              0x000000000042664e <+266>:	mulsd  %xmm5,%xmm0
      
      instead of:
      
              0x0000000000426835 <+276>:	movsd  $2,%xmm0
              0x000000000042683e <+285>:	mulsd  %xmm6,%xmm0
              0x0000000000426842 <+289>:	mulsd  %xmm5,%xmm0
      
      It is unclear why that has such a dramatic performance effect
      in a tight loop, but it's obviously slightly better code, so go with it.
      
      benchmark                 old ns/op    new ns/op    delta
      BenchmarkBinaryTree17    5957470000   5973924000   +0.28%
      BenchmarkFannkuch11      3811295000   3869128000   +1.52%
      BenchmarkGobDecode         26001900     25670500   -1.27%
      BenchmarkGobEncode         12051430     11948590   -0.85%
      BenchmarkGzip                177432       174821   -1.47%
      BenchmarkGunzip               10967        10756   -1.92%
      BenchmarkJSONEncode        78924750     79746900   +1.04%
      BenchmarkJSONDecode       313606400    307081600   -2.08%
      BenchmarkMandelbrot200     13670860      8200725  -40.01%  !!!
      BenchmarkRevcomp25M      1179194000   1206539000   +2.32%
      BenchmarkTemplate         447931200    443948200   -0.89%
      BenchmarkMD5Hash1K             2856         2873   +0.60%
      BenchmarkMD5Hash8K            22083        22029   -0.24%
      
      benchmark                  old MB/s     new MB/s  speedup
      BenchmarkGobDecode            29.52        29.90    1.01x
      BenchmarkGobEncode            63.69        64.24    1.01x
      BenchmarkJSONEncode           24.59        24.33    0.99x
      BenchmarkJSONDecode            6.19         6.32    1.02x
      BenchmarkRevcomp25M          215.54       210.66    0.98x
      BenchmarkTemplate              4.33         4.37    1.01x
      BenchmarkMD5Hash1K           358.54       356.31    0.99x
      BenchmarkMD5Hash8K           370.95       371.86    1.00x
      
      R=ken2
      CC=golang-dev
      https://golang.org/cl/6261051
      de96df1b
    • Nigel Tao's avatar
      image/png: optimize paeth some more. · dbcdce58
      Nigel Tao authored
      filterPaeth takes []byte arguments instead of byte arguments,
      which avoids some redudant computation of the previous pixel
      in the inner loop.
      
      Also eliminate a bounds check in decoding the up filter.
      
      benchmark                       old ns/op    new ns/op    delta
      BenchmarkDecodeGray               3139636      2812531  -10.42%
      BenchmarkDecodeNRGBAGradient     12341520     10971680  -11.10%
      BenchmarkDecodeNRGBAOpaque       10740780      9612455  -10.51%
      BenchmarkDecodePaletted           1819535      1818913   -0.03%
      BenchmarkDecodeRGB                8974695      8178070   -8.88%
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/6243061
      dbcdce58
    • Alex Brainman's avatar
      994cdcea
    • Rémy Oudompheng's avatar
      runtime: do not unset the special bit after finalization. · 34808787
      Rémy Oudompheng authored
      A block with finalizer might also be profiled. The special bit
      is needed to unregister the block from the profile. It will be
      unset only when the block is freed.
      
      Fixes #3668.
      
      R=golang-dev, rsc
      CC=golang-dev, remy
      https://golang.org/cl/6249066
      34808787
    • Andrew Balholm's avatar
      exp/html: Convert \r and \r\n to \n when tokenizing · 4e0749a4
      Andrew Balholm authored
      Also escape "\r" as "&#13;" when rendering HTML.
      
      Pass 2 additional tests.
      
      R=nigeltao
      CC=golang-dev
      https://golang.org/cl/6260046
      4e0749a4
    • Alex Brainman's avatar
      runtime: handle windows exceptions, even in cgo programs · afe0e97a
      Alex Brainman authored
      Fixes #3543.
      
      R=golang-dev, kardianos, rsc
      CC=golang-dev, hectorchu, vcc.163
      https://golang.org/cl/6245063
      afe0e97a
    • Nigel Tao's avatar
      exp/html: add some tokenizer and parser benchmarks. · 034fa90d
      Nigel Tao authored
      $GOROOT/src/pkg/exp/html/testdata/go1.html is an execution of the
      $GOROOT/doc/go1.html template by godoc.
      
      Sample numbers on my linux,amd64 desktop:
      BenchmarkParser	     500	   4699198 ns/op	  16.63 MB/s
      --- BENCH: BenchmarkParser
              parse_test.go:409: 1 iterations, 14653 mallocs per iteration
              parse_test.go:409: 100 iterations, 14651 mallocs per iteration
              parse_test.go:409: 500 iterations, 14651 mallocs per iteration
      BenchmarkRawLevelTokenizer	    2000	    904957 ns/op	  86.37 MB/s
      --- BENCH: BenchmarkRawLevelTokenizer
              token_test.go:657: 1 iterations, 28 mallocs per iteration
              token_test.go:657: 100 iterations, 28 mallocs per iteration
              token_test.go:657: 2000 iterations, 28 mallocs per iteration
      BenchmarkLowLevelTokenizer	    2000	   1134300 ns/op	  68.91 MB/s
      --- BENCH: BenchmarkLowLevelTokenizer
              token_test.go:657: 1 iterations, 41 mallocs per iteration
              token_test.go:657: 100 iterations, 41 mallocs per iteration
              token_test.go:657: 2000 iterations, 41 mallocs per iteration
      BenchmarkHighLevelTokenizer	    1000	   2096179 ns/op	  37.29 MB/s
      --- BENCH: BenchmarkHighLevelTokenizer
              token_test.go:657: 1 iterations, 6616 mallocs per iteration
              token_test.go:657: 100 iterations, 6616 mallocs per iteration
              token_test.go:657: 1000 iterations, 6616 mallocs per iteration
      
      R=rsc
      CC=andybalholm, golang-dev, r
      https://golang.org/cl/6257067
      034fa90d
  2. 29 May, 2012 23 commits
  3. 28 May, 2012 6 commits