1. 28 Aug, 2018 7 commits
    • Fazlul Shahriar's avatar
      os/exec: pass ExitCode tests on Plan 9 · 2e234754
      Fazlul Shahriar authored
      Fixes #27294
      
      Change-Id: I8db5ca0f0c690bf532d3d33b8ed7d2633ad1702b
      Reviewed-on: https://go-review.googlesource.com/131855Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      2e234754
    • Tobias Klauser's avatar
      internal/syscall/unix: remove unnecessary empty.s · 975f1afd
      Tobias Klauser authored
      After CL 130736 there are no empty function declarations this package
      anymore, so empty.s is no longer needed.
      
      Change-Id: Ic4306f10ad8a31777a3337870ce19e14c1510f3b
      Reviewed-on: https://go-review.googlesource.com/131835
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      975f1afd
    • Yasuhiro Matsumoto's avatar
      syscall: implement Unix Socket for Windows · 76c45877
      Yasuhiro Matsumoto authored
      Add implementation of AF_UNIX. This works only on Windows 10.
      
      https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/
      
      Fixes #26072
      
      Change-Id: I76a96a472385a17901885271622fbe55d66bb720
      Reviewed-on: https://go-review.googlesource.com/125456
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
      76c45877
    • Eric Ponce's avatar
      math: add Round and RoundToEven examples · ded94115
      Eric Ponce authored
      Change-Id: Ibef5f96ea588d17eac1c96ee3992e01943ba0fef
      Reviewed-on: https://go-review.googlesource.com/131496
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      ded94115
    • Ian Lance Taylor's avatar
      cmd/go: add GOMIPS value to build id for mipsle · 61318d7f
      Ian Lance Taylor authored
      Strip a trailing "le" from the GOARCH value when calculating the GOxxx
      environment variable that affects it.
      
      Fixes #27260
      
      Change-Id: I081f30d5dc19281901551823f4f56be028b5f71a
      Reviewed-on: https://go-review.googlesource.com/131379Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      61318d7f
    • Ben Shi's avatar
      cmd/compile: optimize arm64 with indexed FP load/store · 3ca3e89b
      Ben Shi authored
      The FP load/store on arm64 have register indexed forms. And this
      CL implements this optimization.
      
      1. The total size of pkg/android_arm64 (excluding cmd/compile)
      decreases about 400 bytes.
      
      2. There is no regression in the go1 benchmark, the test case
      GobEncode even gets slight improvement, excluding noise.
      
      name                     old time/op    new time/op    delta
      BinaryTree17-4              19.0s ± 0%     19.0s ± 1%    ~     (p=0.817 n=29+29)
      Fannkuch11-4                9.94s ± 0%     9.95s ± 0%  +0.03%  (p=0.010 n=24+30)
      FmtFprintfEmpty-4           233ns ± 0%     233ns ± 0%    ~     (all equal)
      FmtFprintfString-4          427ns ± 0%     427ns ± 0%    ~     (p=0.649 n=30+30)
      FmtFprintfInt-4             471ns ± 0%     471ns ± 0%    ~     (all equal)
      FmtFprintfIntInt-4          730ns ± 0%     730ns ± 0%    ~     (all equal)
      FmtFprintfPrefixedInt-4     889ns ± 0%     889ns ± 0%    ~     (all equal)
      FmtFprintfFloat-4          1.21µs ± 0%    1.21µs ± 0%  +0.04%  (p=0.012 n=20+30)
      FmtManyArgs-4              2.99µs ± 0%    2.99µs ± 0%    ~     (p=0.651 n=29+29)
      GobDecode-4                42.4ms ± 1%    42.3ms ± 1%  -0.27%  (p=0.001 n=29+28)
      GobEncode-4                37.8ms ±11%    36.0ms ± 0%  -4.67%  (p=0.000 n=30+26)
      Gzip-4                      1.98s ± 1%     1.96s ± 1%  -1.26%  (p=0.000 n=30+30)
      Gunzip-4                    175ms ± 0%     175ms ± 0%    ~     (p=0.988 n=29+29)
      HTTPClientServer-4          854µs ± 5%     860µs ± 5%    ~     (p=0.236 n=28+29)
      JSONEncode-4               88.8ms ± 0%    87.9ms ± 0%  -1.00%  (p=0.000 n=24+26)
      JSONDecode-4                390ms ± 1%     392ms ± 2%  +0.48%  (p=0.025 n=30+30)
      Mandelbrot200-4            19.5ms ± 0%    19.5ms ± 0%    ~     (p=0.894 n=24+29)
      GoParse-4                  20.3ms ± 0%    20.1ms ± 1%  -0.94%  (p=0.000 n=27+26)
      RegexpMatchEasy0_32-4       451ns ± 0%     451ns ± 0%    ~     (p=0.578 n=30+30)
      RegexpMatchEasy0_1K-4      1.63µs ± 0%    1.63µs ± 0%    ~     (p=0.298 n=30+28)
      RegexpMatchEasy1_32-4       431ns ± 0%     434ns ± 0%  +0.67%  (p=0.000 n=30+29)
      RegexpMatchEasy1_1K-4      2.60µs ± 0%    2.64µs ± 0%  +1.36%  (p=0.000 n=28+26)
      RegexpMatchMedium_32-4      744ns ± 0%     744ns ± 0%    ~     (p=0.474 n=29+29)
      RegexpMatchMedium_1K-4      223µs ± 0%     223µs ± 0%  -0.08%  (p=0.038 n=26+30)
      RegexpMatchHard_32-4       12.2µs ± 0%    12.3µs ± 0%  +0.27%  (p=0.000 n=29+30)
      RegexpMatchHard_1K-4        373µs ± 0%     373µs ± 0%    ~     (p=0.219 n=29+28)
      Revcomp-4                   2.84s ± 0%     2.84s ± 0%    ~     (p=0.130 n=28+28)
      Template-4                  394ms ± 1%     392ms ± 1%  -0.52%  (p=0.001 n=30+30)
      TimeParse-4                1.93µs ± 0%    1.93µs ± 0%    ~     (p=0.587 n=29+30)
      TimeFormat-4               2.00µs ± 0%    2.00µs ± 0%  +0.07%  (p=0.001 n=28+27)
      [Geo mean]                  306µs          305µs       -0.17%
      
      name                     old speed      new speed      delta
      GobDecode-4              18.1MB/s ± 1%  18.2MB/s ± 1%  +0.27%  (p=0.001 n=29+28)
      GobEncode-4              20.3MB/s ±10%  21.3MB/s ± 0%  +4.64%  (p=0.000 n=30+26)
      Gzip-4                   9.79MB/s ± 1%  9.91MB/s ± 1%  +1.28%  (p=0.000 n=30+30)
      Gunzip-4                  111MB/s ± 0%   111MB/s ± 0%    ~     (p=0.988 n=29+29)
      JSONEncode-4             21.8MB/s ± 0%  22.1MB/s ± 0%  +1.02%  (p=0.000 n=24+26)
      JSONDecode-4             4.97MB/s ± 1%  4.95MB/s ± 2%  -0.45%  (p=0.031 n=30+30)
      GoParse-4                2.85MB/s ± 1%  2.88MB/s ± 1%  +1.03%  (p=0.000 n=30+26)
      RegexpMatchEasy0_32-4    70.9MB/s ± 0%  70.9MB/s ± 0%    ~     (p=0.904 n=29+28)
      RegexpMatchEasy0_1K-4     627MB/s ± 0%   627MB/s ± 0%    ~     (p=0.156 n=30+30)
      RegexpMatchEasy1_32-4    74.2MB/s ± 0%  73.7MB/s ± 0%  -0.67%  (p=0.000 n=30+29)
      RegexpMatchEasy1_1K-4     393MB/s ± 0%   388MB/s ± 0%  -1.34%  (p=0.000 n=28+26)
      RegexpMatchMedium_32-4   1.34MB/s ± 0%  1.34MB/s ± 0%    ~     (all equal)
      RegexpMatchMedium_1K-4   4.59MB/s ± 0%  4.59MB/s ± 0%  +0.07%  (p=0.035 n=25+30)
      RegexpMatchHard_32-4     2.61MB/s ± 0%  2.61MB/s ± 0%  -0.11%  (p=0.002 n=28+30)
      RegexpMatchHard_1K-4     2.75MB/s ± 0%  2.75MB/s ± 0%  +0.15%  (p=0.001 n=30+24)
      Revcomp-4                89.4MB/s ± 0%  89.4MB/s ± 0%    ~     (p=0.140 n=28+28)
      Template-4               4.93MB/s ± 1%  4.95MB/s ± 1%  +0.51%  (p=0.001 n=30+30)
      [Geo mean]               18.4MB/s       18.4MB/s       +0.37%
      
      Change-Id: I9a6b521a971b21cfb51064e8e9b853cef8a1d071
      Reviewed-on: https://go-review.googlesource.com/124636
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      3ca3e89b
    • Guoliang Wang's avatar
      os: add ExitCode method to ProcessState · be94dac4
      Guoliang Wang authored
      Fixes #26539
      
      Change-Id: I6d403c1bbb552e1f1bdcc09a7ccd60b50617e0fc
      GitHub-Last-Rev: 0b5262df5d99504523fd7a4665cb70a3cc6b0a09
      GitHub-Pull-Request: golang/go#26544
      Reviewed-on: https://go-review.googlesource.com/125443
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      be94dac4
  2. 27 Aug, 2018 3 commits
    • Ben Shi's avatar
      cmd/compile: optimize arm's comparison · 2b69ad0b
      Ben Shi authored
      The CMP/CMN/TST/TEQ perform similar to SUB/ADD/AND/XOR except
      the result is abondoned, and only NZCV flags are affected.
      
      This CL implements further optimization with them.
      
      1. A micro benchmark test gets more than 9% improvment.
      TSTTEQ-4                   6.99ms ± 0%    6.35ms ± 0%  -9.15%  (p=0.000 n=33+36)
      (https://github.com/benshi001/ugo1/blob/master/tstteq2_test.go)
      
      2. The go1 benckmark shows no regression, excluding noise.
      name                     old time/op    new time/op    delta
      BinaryTree17-4              25.7s ± 1%     25.7s ± 1%    ~     (p=0.830 n=40+40)
      Fannkuch11-4                13.3s ± 0%     13.2s ± 0%  -0.65%  (p=0.000 n=40+34)
      FmtFprintfEmpty-4           394ns ± 0%     394ns ± 0%    ~     (p=0.819 n=40+40)
      FmtFprintfString-4          677ns ± 0%     677ns ± 0%  +0.06%  (p=0.039 n=39+40)
      FmtFprintfInt-4             707ns ± 0%     706ns ± 0%  -0.14%  (p=0.000 n=40+39)
      FmtFprintfIntInt-4         1.04µs ± 0%    1.04µs ± 0%  +0.10%  (p=0.000 n=29+31)
      FmtFprintfPrefixedInt-4    1.10µs ± 0%    1.11µs ± 0%  +0.65%  (p=0.000 n=39+37)
      FmtFprintfFloat-4          2.27µs ± 0%    2.26µs ± 0%  -0.53%  (p=0.000 n=39+40)
      FmtManyArgs-4              3.96µs ± 0%    3.96µs ± 0%  +0.10%  (p=0.000 n=39+40)
      GobDecode-4                53.4ms ± 1%    52.8ms ± 2%  -1.10%  (p=0.000 n=39+39)
      GobEncode-4                50.3ms ± 3%    50.4ms ± 2%    ~     (p=0.089 n=40+39)
      Gzip-4                      2.62s ± 0%     2.64s ± 0%  +0.60%  (p=0.000 n=40+39)
      Gunzip-4                    312ms ± 0%     312ms ± 0%  +0.02%  (p=0.030 n=40+39)
      HTTPClientServer-4         1.01ms ± 7%    0.98ms ± 7%  -2.37%  (p=0.000 n=40+39)
      JSONEncode-4                126ms ± 1%     126ms ± 1%  -0.38%  (p=0.004 n=39+39)
      JSONDecode-4                423ms ± 0%     426ms ± 2%  +0.72%  (p=0.001 n=39+40)
      Mandelbrot200-4            18.4ms ± 0%    18.4ms ± 0%  +0.04%  (p=0.000 n=38+40)
      GoParse-4                  22.8ms ± 0%    22.6ms ± 0%  -0.68%  (p=0.000 n=35+40)
      RegexpMatchEasy0_32-4       699ns ± 0%     704ns ± 0%  +0.73%  (p=0.000 n=27+40)
      RegexpMatchEasy0_1K-4      4.27µs ± 0%    4.26µs ± 0%  -0.09%  (p=0.000 n=35+38)
      RegexpMatchEasy1_32-4       741ns ± 0%     735ns ± 0%  -0.85%  (p=0.000 n=40+35)
      RegexpMatchEasy1_1K-4      5.53µs ± 0%    5.49µs ± 0%  -0.69%  (p=0.000 n=39+40)
      RegexpMatchMedium_32-4     1.07µs ± 0%    1.04µs ± 2%  -2.34%  (p=0.000 n=40+40)
      RegexpMatchMedium_1K-4      261µs ± 0%     261µs ± 0%  -0.16%  (p=0.000 n=40+39)
      RegexpMatchHard_32-4       14.9µs ± 0%    14.9µs ± 0%  -0.18%  (p=0.000 n=39+40)
      RegexpMatchHard_1K-4        445µs ± 0%     446µs ± 0%  +0.09%  (p=0.000 n=36+34)
      Revcomp-4                  41.8ms ± 1%    41.8ms ± 1%    ~     (p=0.595 n=39+38)
      Template-4                  530ms ± 1%     528ms ± 1%  -0.49%  (p=0.000 n=40+40)
      TimeParse-4                3.39µs ± 0%    3.42µs ± 0%  +0.98%  (p=0.000 n=36+38)
      TimeFormat-4               6.12µs ± 0%    6.07µs ± 0%  -0.81%  (p=0.000 n=34+38)
      [Geo mean]                  384µs          383µs       -0.24%
      
      name                     old speed      new speed      delta
      GobDecode-4              14.4MB/s ± 1%  14.5MB/s ± 2%  +1.11%  (p=0.000 n=39+39)
      GobEncode-4              15.3MB/s ± 3%  15.2MB/s ± 2%    ~     (p=0.104 n=40+39)
      Gzip-4                   7.40MB/s ± 1%  7.36MB/s ± 0%  -0.60%  (p=0.000 n=40+39)
      Gunzip-4                 62.2MB/s ± 0%  62.1MB/s ± 0%  -0.02%  (p=0.047 n=40+39)
      JSONEncode-4             15.4MB/s ± 1%  15.4MB/s ± 2%  +0.39%  (p=0.002 n=39+39)
      JSONDecode-4             4.59MB/s ± 0%  4.56MB/s ± 2%  -0.71%  (p=0.000 n=39+40)
      GoParse-4                2.54MB/s ± 0%  2.56MB/s ± 0%  +0.72%  (p=0.000 n=26+40)
      RegexpMatchEasy0_32-4    45.8MB/s ± 0%  45.4MB/s ± 0%  -0.75%  (p=0.000 n=38+40)
      RegexpMatchEasy0_1K-4     240MB/s ± 0%   240MB/s ± 0%  +0.09%  (p=0.000 n=35+38)
      RegexpMatchEasy1_32-4    43.1MB/s ± 0%  43.5MB/s ± 0%  +0.84%  (p=0.000 n=40+39)
      RegexpMatchEasy1_1K-4     185MB/s ± 0%   186MB/s ± 0%  +0.69%  (p=0.000 n=39+40)
      RegexpMatchMedium_32-4    936kB/s ± 1%   959kB/s ± 2%  +2.38%  (p=0.000 n=40+40)
      RegexpMatchMedium_1K-4   3.92MB/s ± 0%  3.93MB/s ± 0%  +0.18%  (p=0.000 n=39+40)
      RegexpMatchHard_32-4     2.15MB/s ± 0%  2.15MB/s ± 0%  +0.19%  (p=0.000 n=40+40)
      RegexpMatchHard_1K-4     2.30MB/s ± 0%  2.30MB/s ± 0%    ~     (all equal)
      Revcomp-4                60.8MB/s ± 1%  60.8MB/s ± 1%    ~     (p=0.600 n=39+38)
      Template-4               3.66MB/s ± 1%  3.68MB/s ± 1%  +0.46%  (p=0.000 n=40+40)
      [Geo mean]               12.8MB/s       12.8MB/s       +0.27%
      
      Change-Id: I849161169ecf0876a04b7c1d3990fa8d1435215e
      Reviewed-on: https://go-review.googlesource.com/122855
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      2b69ad0b
    • Ben Shi's avatar
      cmd/compile: add missing type information for some arm/arm64 rules · 096229b2
      Ben Shi authored
      Some indexed load/store rules lack of type information, and this
      CL adds that for them.
      
      Change-Id: Icac315ccb83a2f5bf30b056d4667d5b59eb4e5e2
      Reviewed-on: https://go-review.googlesource.com/128455Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      096229b2
    • Benny Siegert's avatar
      cmd/dist: do not run race detector tests on netbsd · 7334904e
      Benny Siegert authored
      The race detector is not fully functional on NetBSD yet. Without
      this change, all.bash fails in TestOutput.
      
      This unbreaks the netbsd-amd64 builder.
      
      Update #26403
      Fixes #27268
      
      Change-Id: I2c7015692d3632aa1037f40155d4fc5c7bb1d8c3
      Reviewed-on: https://go-review.googlesource.com/131555Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7334904e
  3. 26 Aug, 2018 6 commits
  4. 25 Aug, 2018 7 commits
    • Daniel Martí's avatar
      encoding/json: remove a branch in the structEncoder loop · c21ba224
      Daniel Martí authored
      Encoders like map and array can use the much cheaper "i > 0" check to
      see if we're not writing the first element. However, since struct fields
      support omitempty, we need to keep track of that separately.
      
      This is much more expensive - after calling the field encoder itself,
      and retrieving the field via reflection, this branch was the third most
      expensive piece of this field loop.
      
      Instead, hoist the branch logic outside of the loop. The code doesn't
      get much more complex, since we just delay the writing of each byte
      until the next iteration. Yet the performance improvement is noticeable,
      even when the struct types in CodeEncoder only have 2 and 7 fields,
      respectively.
      
      name           old time/op    new time/op    delta
      CodeEncoder-4    5.39ms ± 0%    5.31ms ± 0%  -1.37%  (p=0.010 n=4+6)
      
      name           old speed      new speed      delta
      CodeEncoder-4   360MB/s ± 0%   365MB/s ± 0%  +1.39%  (p=0.010 n=4+6)
      
      Updates #5683.
      
      Change-Id: I2662cf459e0dfd68e56fa52bc898a417e84266c2
      Reviewed-on: https://go-review.googlesource.com/131401
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c21ba224
    • Daniel Martí's avatar
      encoding/json: avoid some more pointer receivers · 88f4bcce
      Daniel Martí authored
      A few encoder struct types, such as map and slice, only encapsulate
      other prepared encoder funcs. Using pointer receivers has no advantage,
      and makes calling these methods slightly more expensive.
      
      Not a huge performance win, but certainly an easy one. The struct types
      used in the benchmark below contain one slice field and one pointer
      field.
      
      name           old time/op    new time/op    delta
      CodeEncoder-4    5.48ms ± 0%    5.39ms ± 0%  -1.66%  (p=0.010 n=6+4)
      
      name           old speed      new speed      delta
      CodeEncoder-4   354MB/s ± 0%   360MB/s ± 0%  +1.69%  (p=0.010 n=6+4)
      
      Updates #5683.
      
      Change-Id: I9f78dbe07fcc6fbf19a6d96c22f5d6970db9eca4
      Reviewed-on: https://go-review.googlesource.com/131400
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      88f4bcce
    • Brad Fitzpatrick's avatar
      net/http: make Transport return Writable Response.Body on protocol switch · 54162040
      Brad Fitzpatrick authored
      Updates #26937
      Updates #17227
      
      Change-Id: I79865938b05c219e1947822e60e4f52bb2604b70
      Reviewed-on: https://go-review.googlesource.com/131279Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      54162040
    • Goo's avatar
      src/make.bat: add missing go.exe extension · 30b080e0
      Goo authored
      Got error:
      'go' is not an internal or external command, nor is it a runnable program
      
      Change-Id: Ie45a3a12252fa01b67ca09ef8fbb5b4bbf728fe7
      GitHub-Last-Rev: 451815cacd9bfc509fa0aab3be54303797e605a2
      GitHub-Pull-Request: golang/go#27214
      Reviewed-on: https://go-review.googlesource.com/131397Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      30b080e0
    • Florin Pățan's avatar
      cmd/dist: fix compilation on windows · d145d923
      Florin Pățan authored
      Add missing extensions to binary files in order to allow execution.
      
      Change-Id: Idfe4c72c80c26b7b938023bc7bbe1ef85e1aa7b0
      
      Change-Id: Idfe4c72c80c26b7b938023bc7bbe1ef85e1aa7b0
      GitHub-Last-Rev: ed9d8124270c30b7f25f89656432ef5089466c7e
      GitHub-Pull-Request: golang/go#26464
      Reviewed-on: https://go-review.googlesource.com/124936
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d145d923
    • Ian Lance Taylor's avatar
      cmd/go: don't let script grep commands match $WORK · f2ed3e1d
      Ian Lance Taylor authored
      If $WORK happens to contain the string that a stdout/stderr/grep
      command is searching for, a negative grep command will fail incorrectly.
      
      Fixes #27170
      Fixes #27221
      
      Change-Id: I84454d3c42360fe3295c7235d388381525eb85b4
      Reviewed-on: https://go-review.googlesource.com/131398
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      f2ed3e1d
    • Ben Shi's avatar
      cmd/compile: optimize 386 code with FLDPI · e03220a5
      Ben Shi authored
      FLDPI pushes the constant pi to 387's register stack, which is
      more efficient than MOVSSconst/MOVSDconst.
      
      1. This optimization reduces 0.3KB of the total size of pkg/linux_386
      (exlcuding cmd/compile).
      
      2. There is little regression in the go1 benchmark.
      name                     old time/op    new time/op    delta
      BinaryTree17-4              3.30s ± 3%     3.30s ± 2%    ~     (p=0.759 n=40+39)
      Fannkuch11-4                3.53s ± 1%     3.54s ± 1%    ~     (p=0.168 n=40+40)
      FmtFprintfEmpty-4          45.5ns ± 3%    45.6ns ± 3%    ~     (p=0.553 n=40+40)
      FmtFprintfString-4         78.4ns ± 3%    78.3ns ± 3%    ~     (p=0.593 n=40+40)
      FmtFprintfInt-4            88.8ns ± 2%    89.9ns ± 2%    ~     (p=0.083 n=40+33)
      FmtFprintfIntInt-4          140ns ± 4%     140ns ± 4%    ~     (p=0.656 n=40+40)
      FmtFprintfPrefixedInt-4     180ns ± 2%     181ns ± 3%  +0.53%  (p=0.050 n=40+40)
      FmtFprintfFloat-4           408ns ± 4%     411ns ± 3%    ~     (p=0.112 n=40+40)
      FmtManyArgs-4               599ns ± 3%     602ns ± 3%    ~     (p=0.784 n=40+40)
      GobDecode-4                7.24ms ± 6%    7.30ms ± 5%    ~     (p=0.171 n=40+40)
      GobEncode-4                6.98ms ± 5%    6.89ms ± 8%    ~     (p=0.107 n=40+40)
      Gzip-4                      396ms ± 4%     396ms ± 3%    ~     (p=0.852 n=40+40)
      Gunzip-4                   41.3ms ± 3%    41.5ms ± 4%    ~     (p=0.221 n=40+40)
      HTTPClientServer-4         63.4µs ± 3%    63.4µs ± 2%    ~     (p=0.895 n=39+40)
      JSONEncode-4               17.5ms ± 2%    17.5ms ± 3%    ~     (p=0.090 n=40+40)
      JSONDecode-4               60.6ms ± 3%    60.1ms ± 4%    ~     (p=0.184 n=40+40)
      Mandelbrot200-4            7.80ms ± 3%    7.78ms ± 2%    ~     (p=0.512 n=40+40)
      GoParse-4                  3.30ms ± 3%    3.28ms ± 2%  -0.61%  (p=0.034 n=40+40)
      RegexpMatchEasy0_32-4       104ns ± 4%     103ns ± 4%    ~     (p=0.118 n=40+40)
      RegexpMatchEasy0_1K-4       850ns ± 2%     848ns ± 2%    ~     (p=0.370 n=40+40)
      RegexpMatchEasy1_32-4       112ns ± 4%     112ns ± 4%    ~     (p=0.848 n=40+40)
      RegexpMatchEasy1_1K-4      1.04µs ± 4%    1.03µs ± 4%    ~     (p=0.333 n=40+40)
      RegexpMatchMedium_32-4      132ns ± 4%     131ns ± 3%    ~     (p=0.527 n=40+40)
      RegexpMatchMedium_1K-4     43.4µs ± 3%    43.5µs ± 3%    ~     (p=0.111 n=40+40)
      RegexpMatchHard_32-4       2.24µs ± 4%    2.24µs ± 4%    ~     (p=0.441 n=40+40)
      RegexpMatchHard_1K-4       67.9µs ± 3%    68.0µs ± 3%    ~     (p=0.095 n=40+40)
      Revcomp-4                   1.84s ± 2%     1.84s ± 2%    ~     (p=0.677 n=40+40)
      Template-4                 68.4ms ± 3%    68.6ms ± 3%    ~     (p=0.345 n=40+40)
      TimeParse-4                 433ns ± 3%     433ns ± 3%    ~     (p=0.403 n=40+40)
      TimeFormat-4                407ns ± 3%     406ns ± 3%    ~     (p=0.900 n=40+40)
      [Geo mean]                 67.1µs         67.2µs       +0.04%
      
      name                     old speed      new speed      delta
      GobDecode-4               106MB/s ± 5%   105MB/s ± 5%    ~     (p=0.173 n=40+40)
      GobEncode-4               110MB/s ± 5%   112MB/s ± 9%    ~     (p=0.104 n=40+40)
      Gzip-4                   49.0MB/s ± 4%  49.1MB/s ± 4%    ~     (p=0.836 n=40+40)
      Gunzip-4                  471MB/s ± 3%   468MB/s ± 4%    ~     (p=0.218 n=40+40)
      JSONEncode-4              111MB/s ± 2%   111MB/s ± 3%    ~     (p=0.090 n=40+40)
      JSONDecode-4             32.0MB/s ± 3%  32.3MB/s ± 4%    ~     (p=0.194 n=40+40)
      GoParse-4                17.6MB/s ± 3%  17.7MB/s ± 2%  +0.62%  (p=0.035 n=40+40)
      RegexpMatchEasy0_32-4     307MB/s ± 4%   309MB/s ± 4%  +0.70%  (p=0.041 n=40+40)
      RegexpMatchEasy0_1K-4    1.20GB/s ± 3%  1.21GB/s ± 2%    ~     (p=0.353 n=40+40)
      RegexpMatchEasy1_32-4     285MB/s ± 3%   284MB/s ± 4%    ~     (p=0.384 n=40+40)
      RegexpMatchEasy1_1K-4     988MB/s ± 4%   992MB/s ± 3%    ~     (p=0.335 n=40+40)
      RegexpMatchMedium_32-4   7.56MB/s ± 4%  7.57MB/s ± 4%    ~     (p=0.314 n=40+40)
      RegexpMatchMedium_1K-4   23.6MB/s ± 3%  23.6MB/s ± 3%    ~     (p=0.107 n=40+40)
      RegexpMatchHard_32-4     14.3MB/s ± 4%  14.3MB/s ± 4%    ~     (p=0.429 n=40+40)
      RegexpMatchHard_1K-4     15.1MB/s ± 3%  15.1MB/s ± 3%    ~     (p=0.099 n=40+40)
      Revcomp-4                 138MB/s ± 2%   138MB/s ± 2%    ~     (p=0.658 n=40+40)
      Template-4               28.4MB/s ± 3%  28.3MB/s ± 3%    ~     (p=0.331 n=40+40)
      [Geo mean]               80.8MB/s       80.8MB/s       +0.09%
      
      Change-Id: I0cb715eead68ade097a302e7fb80ccbd1d1b511e
      Reviewed-on: https://go-review.googlesource.com/130975
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      e03220a5
  5. 24 Aug, 2018 17 commits