1. 27 Sep, 2016 8 commits
    • Michael Munday's avatar
      reflect, runtime: optimize Value.Call on s390x and add benchmark · 3436f077
      Michael Munday authored
      Use an MVC loop to copy arguments in runtime.call* rather than copying
      bytes individually.
      
      I've added the benchmark CallArgCopy to test the speed of Value.Call
      for various argument sizes.
      
      name                    old speed      new speed       delta
      CallArgCopy/size=128     439MB/s ± 1%    582MB/s ± 1%   +32.41%  (p=0.000 n=10+10)
      CallArgCopy/size=256     695MB/s ± 1%   1172MB/s ± 1%   +68.67%  (p=0.000 n=10+10)
      CallArgCopy/size=1024    573MB/s ± 8%   4175MB/s ± 2%  +628.11%  (p=0.000 n=10+10)
      CallArgCopy/size=4096   1.46GB/s ± 2%  10.19GB/s ± 1%  +600.52%  (p=0.000 n=10+10)
      CallArgCopy/size=65536  1.51GB/s ± 0%  12.30GB/s ± 1%  +716.30%   (p=0.000 n=9+10)
      
      Change-Id: I87dae4809330e7964f6cb4a9e40e5b3254dd519d
      Reviewed-on: https://go-review.googlesource.com/28096
      Run-TryBot: Michael Munday <munday@ca.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBill O'Farrell <billotosyr@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3436f077
    • Alberto Donizetti's avatar
      cmd/compile: remove commented-out old c code · 6c43c0c2
      Alberto Donizetti authored
      Change-Id: I9b2e6c45f7e83543a06d0aafd08a911f7b6485fd
      Reviewed-on: https://go-review.googlesource.com/29874Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      6c43c0c2
    • Cherry Zhang's avatar
      cmd/compile: move value around before kick it out of register · f876fb9b
      Cherry Zhang authored
      When allocating registers, before kicking out the existing value,
      copy it to a spare register if there is one. So later use of this
      value can be found in register instead of reload from spill. This
      is very helpful for instructions of which the input and/or output
      can only be in specific registers, e.g. DIV on x86, MUL/DIV on
      MIPS. May also be helpful in general.
      
      For "go build -a cmd/go" on AMD64, reduce "spilled value remains"
      by 1% (not including args, which almost certainly remain).
      
      For the code in issue #16061 on AMD64:
      MaxRem-12   111µs ± 1%    94µs ± 0%  -15.38%  (p=0.008 n=5+5)
      
      Go1 benchmark on AMD64:
      BinaryTree17-12              2.32s ± 2%     2.30s ± 1%    ~     (p=0.421 n=5+5)
      Fannkuch11-12                2.52s ± 0%     2.44s ± 0%  -3.44%  (p=0.008 n=5+5)
      FmtFprintfEmpty-12          39.9ns ± 3%    39.8ns ± 0%    ~     (p=0.635 n=5+4)
      FmtFprintfString-12          114ns ± 1%     113ns ± 1%    ~     (p=0.905 n=5+5)
      FmtFprintfInt-12             102ns ± 6%      98ns ± 1%    ~     (p=0.087 n=5+5)
      FmtFprintfIntInt-12          146ns ± 5%     147ns ± 1%    ~     (p=0.238 n=5+5)
      FmtFprintfPrefixedInt-12     155ns ± 2%     151ns ± 1%  -2.58%  (p=0.008 n=5+5)
      FmtFprintfFloat-12           231ns ± 1%     232ns ± 1%    ~     (p=0.286 n=5+5)
      FmtManyArgs-12               657ns ± 1%     649ns ± 0%  -1.31%  (p=0.008 n=5+5)
      GobDecode-12                6.35ms ± 0%    6.29ms ± 1%    ~     (p=0.056 n=5+5)
      GobEncode-12                5.38ms ± 1%    5.45ms ± 1%    ~     (p=0.056 n=5+5)
      Gzip-12                      209ms ± 0%     209ms ± 1%    ~     (p=0.690 n=5+5)
      Gunzip-12                   31.2ms ± 1%    31.1ms ± 1%    ~     (p=0.548 n=5+5)
      HTTPClientServer-12          123µs ± 4%     130µs ± 8%    ~     (p=0.151 n=5+5)
      JSONEncode-12               14.0ms ± 1%    14.0ms ± 1%    ~     (p=0.421 n=5+5)
      JSONDecode-12               41.2ms ± 1%    41.1ms ± 2%    ~     (p=0.421 n=5+5)
      Mandelbrot200-12            3.96ms ± 1%    3.98ms ± 0%    ~     (p=0.421 n=5+5)
      GoParse-12                  2.88ms ± 1%    2.88ms ± 1%    ~     (p=0.841 n=5+5)
      RegexpMatchEasy0_32-12      68.0ns ± 3%    66.6ns ± 1%  -2.00%  (p=0.024 n=5+5)
      RegexpMatchEasy0_1K-12       728ns ± 8%     682ns ± 1%  -6.26%  (p=0.008 n=5+5)
      RegexpMatchEasy1_32-12      66.8ns ± 2%    66.0ns ± 1%    ~     (p=0.302 n=5+5)
      RegexpMatchEasy1_1K-12       291ns ± 2%     288ns ± 1%    ~     (p=0.111 n=5+5)
      RegexpMatchMedium_32-12      103ns ± 2%     100ns ± 0%  -2.53%  (p=0.016 n=5+4)
      RegexpMatchMedium_1K-12     31.9µs ± 1%    31.3µs ± 0%  -1.75%  (p=0.008 n=5+5)
      RegexpMatchHard_32-12       1.59µs ± 2%    1.59µs ± 1%    ~     (p=0.548 n=5+5)
      RegexpMatchHard_1K-12       48.3µs ± 2%    47.7µs ± 1%    ~     (p=0.222 n=5+5)
      Revcomp-12                   340ms ± 1%     338ms ± 1%    ~     (p=0.421 n=5+5)
      Template-12                 46.3ms ± 1%    46.5ms ± 1%    ~     (p=0.690 n=5+5)
      TimeParse-12                 252ns ± 1%     247ns ± 0%  -1.91%  (p=0.000 n=5+4)
      TimeFormat-12                277ns ± 1%     267ns ± 0%  -3.82%  (p=0.008 n=5+5)
      [Geo mean]                  48.8µs         48.3µs       -0.93%
      
      It has very little effect on binary size and compiler speed.
      compilebench:
      Template       230ms ±10%      231ms ± 8%    ~             (p=0.546 n=9+9)
      Unicode        123ms ± 6%      124ms ± 9%    ~           (p=0.481 n=10+10)
      GoTypes        742ms ± 6%      755ms ± 3%    ~           (p=0.123 n=10+10)
      Compiler       3.10s ± 3%      3.08s ± 1%    ~           (p=0.631 n=10+10)
      
      Fixes #16061.
      
      Change-Id: Id99cdc7a182ee10a704fa0f04e8e0d0809b2ac56
      Reviewed-on: https://go-review.googlesource.com/29732
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      f876fb9b
    • Cherry Zhang's avatar
      runtime, cmd/compile: implement and use DUFFCOPY on ARM64 · 9d4b40f5
      Cherry Zhang authored
      Change-Id: I8984eac30e5df78d4b94f19412135d3cc36969f8
      Reviewed-on: https://go-review.googlesource.com/29910
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      9d4b40f5
    • Oliver Tonnhofer's avatar
      image/png: improve compression by skipping filter for paletted images · 7de7d20e
      Oliver Tonnhofer authored
      Compression of paletted images is more efficient if they are not filtered.
      This patch skips filtering for cbP8 images.
      The improvements are demonstrated at https://github.com/olt/compressbench
      
      Fixes #16196
      
      Change-Id: Ie973aad287cacf9057e394bb01cf0e4448a77618
      Reviewed-on: https://go-review.googlesource.com/29872Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7de7d20e
    • Alberto Donizetti's avatar
      cmd/compile: fix misaligned comments · 590f3f0c
      Alberto Donizetti authored
      Realign multi-line comments that got misaligned by the c->go
      conversion.
      
      Change-Id: I584b902e95cf588aa14febf1e0b6dfa499c303c2
      Reviewed-on: https://go-review.googlesource.com/29871Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      590f3f0c
    • Sam Whited's avatar
      database/sql: add doc comment for ErrTxDone · 8f9e2ab5
      Sam Whited authored
      Change-Id: Idffb82cdcba4985954d061bdb021217f47ff4985
      Reviewed-on: https://go-review.googlesource.com/29850Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8f9e2ab5
    • Michal Bohuslávek's avatar
      math/big: support negative numbers in ModInverse · 9ed0715b
      Michal Bohuslávek authored
      Fixes #16984
      
      Change-Id: I3a330e82941a068ca6097985af4ab221275fd336
      Reviewed-on: https://go-review.googlesource.com/29299
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      9ed0715b
  2. 26 Sep, 2016 20 commits
  3. 25 Sep, 2016 10 commits
  4. 24 Sep, 2016 2 commits