1. 28 Sep, 2018 8 commits
    • Austin Clements's avatar
      runtime: don't call mcache.refill on systemstack · 01e6cfc2
      Austin Clements authored
      mcache.refill doesn't need to run on the system stack; it just needs
      to be non-preemptible. Its only caller, mcache.nextFree, also needs to
      be non-preemptible, so we can remove the unnecessary systemstack
      switch.
      
      Change-Id: Iba5b3f4444855f1dc134485ba588efff3b54c426
      Reviewed-on: https://go-review.googlesource.com/138196
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarRick Hudson <rlh@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      01e6cfc2
    • Austin Clements's avatar
      runtime: remove redundant locking in mcache.refill · 2d23ece1
      Austin Clements authored
      mcache.refill acquires g.m.locks, which is pointless because the
      caller itself absolutely must have done so already to prevent
      ownership of mcache from shifting.
      
      Also, mcache.refill's documentation is generally a bit out-of-date, so
      this cleans this up.
      
      Change-Id: Idc8de666fcaf3c3d96006bd23a8f307539587d6c
      Reviewed-on: https://go-review.googlesource.com/138195
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRick Hudson <rlh@golang.org>
      2d23ece1
    • Alessandro Arzilli's avatar
      doc: remove "known bug" about global variables in debug_info. · eac99c44
      Alessandro Arzilli authored
      This hasn't been true at least since 1.4. Until golang.org/cl/137235
      they were lumped together into a random compile unit, now they are
      assigned to the correct one.
      
      Change-Id: Ib66539bd67af3e9daeecac8bf5f32c10e62e11b1
      Reviewed-on: https://go-review.googlesource.com/138415Reviewed-by: default avatarThan McIntosh <thanm@google.com>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      eac99c44
    • Ben Shi's avatar
      cmd/compile: optimize arm64's code with more shifted operations · 5aeecc45
      Ben Shi authored
      This CL optimizes arm64's NEG/MVN/TST/CMN with a shifted operand.
      
      1. The total size of pkg/android_arm64 decreases about 0.2KB, excluding
      cmd/compile/ .
      
      2. The go1 benchmark shows no regression, excluding noise.
      name                     old time/op    new time/op    delta
      BinaryTree17-4              16.4s ± 1%     16.4s ± 1%    ~     (p=0.914 n=29+29)
      Fannkuch11-4                8.72s ± 0%     8.72s ± 0%    ~     (p=0.274 n=30+29)
      FmtFprintfEmpty-4           174ns ± 0%     174ns ± 0%    ~     (all equal)
      FmtFprintfString-4          370ns ± 0%     370ns ± 0%    ~     (all equal)
      FmtFprintfInt-4             419ns ± 0%     419ns ± 0%    ~     (all equal)
      FmtFprintfIntInt-4          672ns ± 1%     675ns ± 2%    ~     (p=0.217 n=28+30)
      FmtFprintfPrefixedInt-4     806ns ± 0%     806ns ± 0%    ~     (p=0.402 n=30+28)
      FmtFprintfFloat-4          1.09µs ± 0%    1.09µs ± 0%  +0.02%  (p=0.011 n=22+27)
      FmtManyArgs-4              2.67µs ± 0%    2.68µs ± 0%    ~     (p=0.279 n=29+30)
      GobDecode-4                33.1ms ± 1%    33.1ms ± 0%    ~     (p=0.052 n=28+29)
      GobEncode-4                29.6ms ± 0%    29.6ms ± 0%  +0.08%  (p=0.013 n=28+29)
      Gzip-4                      1.38s ± 2%     1.39s ± 2%    ~     (p=0.071 n=29+29)
      Gunzip-4                    139ms ± 0%     139ms ± 0%    ~     (p=0.265 n=29+29)
      HTTPClientServer-4          789µs ± 4%     785µs ± 4%    ~     (p=0.206 n=29+28)
      JSONEncode-4               49.7ms ± 0%    49.6ms ± 0%  -0.24%  (p=0.000 n=30+30)
      JSONDecode-4                266ms ± 1%     267ms ± 1%  +0.34%  (p=0.000 n=30+30)
      Mandelbrot200-4            16.6ms ± 0%    16.6ms ± 0%    ~     (p=0.835 n=28+30)
      GoParse-4                  15.9ms ± 0%    15.8ms ± 0%  -0.29%  (p=0.000 n=27+30)
      RegexpMatchEasy0_32-4       380ns ± 0%     381ns ± 0%  +0.18%  (p=0.000 n=30+30)
      RegexpMatchEasy0_1K-4      1.18µs ± 0%    1.19µs ± 0%  +0.23%  (p=0.000 n=30+30)
      RegexpMatchEasy1_32-4       357ns ± 0%     358ns ± 0%  +0.28%  (p=0.000 n=29+29)
      RegexpMatchEasy1_1K-4      2.04µs ± 0%    2.04µs ± 0%  +0.06%  (p=0.006 n=30+30)
      RegexpMatchMedium_32-4      589ns ± 0%     590ns ± 0%  +0.24%  (p=0.000 n=28+30)
      RegexpMatchMedium_1K-4      162µs ± 0%     162µs ± 0%  -0.01%  (p=0.027 n=26+29)
      RegexpMatchHard_32-4       9.58µs ± 0%    9.58µs ± 0%    ~     (p=0.935 n=30+30)
      RegexpMatchHard_1K-4        287µs ± 0%     287µs ± 0%    ~     (p=0.387 n=29+30)
      Revcomp-4                   2.50s ± 0%     2.50s ± 0%  -0.10%  (p=0.020 n=28+28)
      Template-4                  310ms ± 0%     310ms ± 1%    ~     (p=0.406 n=30+30)
      TimeParse-4                1.68µs ± 0%    1.68µs ± 0%  +0.03%  (p=0.014 n=30+17)
      TimeFormat-4               1.65µs ± 0%    1.66µs ± 0%  +0.32%  (p=0.000 n=27+29)
      [Geo mean]                  247µs          247µs       +0.05%
      
      name                     old speed      new speed      delta
      GobDecode-4              23.2MB/s ± 0%  23.2MB/s ± 0%  -0.08%  (p=0.032 n=27+29)
      GobEncode-4              26.0MB/s ± 0%  25.9MB/s ± 0%  -0.10%  (p=0.011 n=29+29)
      Gzip-4                   14.1MB/s ± 2%  14.0MB/s ± 2%    ~     (p=0.081 n=29+29)
      Gunzip-4                  139MB/s ± 0%   139MB/s ± 0%    ~     (p=0.290 n=29+29)
      JSONEncode-4             39.0MB/s ± 0%  39.1MB/s ± 0%  +0.25%  (p=0.000 n=29+30)
      JSONDecode-4             7.30MB/s ± 1%  7.28MB/s ± 1%  -0.33%  (p=0.000 n=30+30)
      GoParse-4                3.65MB/s ± 0%  3.66MB/s ± 0%  +0.29%  (p=0.000 n=27+30)
      RegexpMatchEasy0_32-4    84.1MB/s ± 0%  84.0MB/s ± 0%  -0.17%  (p=0.000 n=30+28)
      RegexpMatchEasy0_1K-4     864MB/s ± 0%   862MB/s ± 0%  -0.24%  (p=0.000 n=30+30)
      RegexpMatchEasy1_32-4    89.5MB/s ± 0%  89.3MB/s ± 0%  -0.18%  (p=0.000 n=28+24)
      RegexpMatchEasy1_1K-4     502MB/s ± 0%   502MB/s ± 0%  -0.05%  (p=0.008 n=30+29)
      RegexpMatchMedium_32-4   1.70MB/s ± 0%  1.69MB/s ± 0%  -0.59%  (p=0.000 n=29+30)
      RegexpMatchMedium_1K-4   6.31MB/s ± 0%  6.31MB/s ± 0%  +0.05%  (p=0.005 n=30+26)
      RegexpMatchHard_32-4     3.34MB/s ± 0%  3.34MB/s ± 0%    ~     (all equal)
      RegexpMatchHard_1K-4     3.57MB/s ± 0%  3.57MB/s ± 0%    ~     (all equal)
      Revcomp-4                 102MB/s ± 0%   102MB/s ± 0%  +0.10%  (p=0.022 n=28+28)
      Template-4               6.26MB/s ± 0%  6.26MB/s ± 1%    ~     (p=0.768 n=30+30)
      [Geo mean]               24.2MB/s       24.1MB/s       -0.08%
      
      Change-Id: I494f9db7f8a568a00e9c74ae25086a58b2221683
      Reviewed-on: https://go-review.googlesource.com/137976
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      5aeecc45
    • Ben Shi's avatar
      cmd/compile: optimize arm64's MADD and MSUB · d60cf39f
      Ben Shi authored
      This CL implements constant folding for MADD/MSUB on arm64.
      
      1. The total size of pkg/android_arm64/ decreases about 4KB,
         excluding cmd/compile/ .
      
      2. There is no regression in the go1 benchmark, excluding noise.
      name                     old time/op    new time/op    delta
      BinaryTree17-4              16.4s ± 1%     16.5s ± 1%  +0.24%  (p=0.008 n=29+29)
      Fannkuch11-4                8.73s ± 0%     8.71s ± 0%  -0.15%  (p=0.000 n=29+29)
      FmtFprintfEmpty-4           174ns ± 0%     174ns ± 0%    ~     (all equal)
      FmtFprintfString-4          370ns ± 0%     372ns ± 2%  +0.53%  (p=0.007 n=24+30)
      FmtFprintfInt-4             419ns ± 0%     419ns ± 0%    ~     (all equal)
      FmtFprintfIntInt-4          673ns ± 1%     661ns ± 1%  -1.81%  (p=0.000 n=30+27)
      FmtFprintfPrefixedInt-4     806ns ± 0%     805ns ± 0%    ~     (p=0.957 n=28+27)
      FmtFprintfFloat-4          1.09µs ± 0%    1.09µs ± 0%  -0.04%  (p=0.001 n=22+30)
      FmtManyArgs-4              2.67µs ± 0%    2.68µs ± 0%  +0.03%  (p=0.045 n=29+28)
      GobDecode-4                33.2ms ± 1%    32.5ms ± 1%  -2.11%  (p=0.000 n=29+29)
      GobEncode-4                29.5ms ± 0%    29.2ms ± 0%  -1.04%  (p=0.000 n=28+28)
      Gzip-4                      1.39s ± 2%     1.38s ± 1%  -0.48%  (p=0.023 n=30+30)
      Gunzip-4                    139ms ± 0%     139ms ± 0%    ~     (p=0.616 n=30+28)
      HTTPClientServer-4          766µs ± 4%     758µs ± 3%  -1.03%  (p=0.013 n=28+29)
      JSONEncode-4               49.7ms ± 0%    49.6ms ± 0%  -0.24%  (p=0.000 n=30+30)
      JSONDecode-4                266ms ± 0%     268ms ± 1%  +1.07%  (p=0.000 n=29+30)
      Mandelbrot200-4            16.6ms ± 0%    16.6ms ± 0%    ~     (p=0.248 n=30+29)
      GoParse-4                  15.9ms ± 0%    16.0ms ± 0%  +0.76%  (p=0.000 n=29+29)
      RegexpMatchEasy0_32-4       381ns ± 0%     380ns ± 0%  -0.14%  (p=0.000 n=30+30)
      RegexpMatchEasy0_1K-4      1.18µs ± 0%    1.19µs ± 1%  +0.30%  (p=0.000 n=29+30)
      RegexpMatchEasy1_32-4       357ns ± 0%     357ns ± 0%    ~     (all equal)
      RegexpMatchEasy1_1K-4      2.04µs ± 0%    2.05µs ± 0%  +0.50%  (p=0.000 n=26+28)
      RegexpMatchMedium_32-4      590ns ± 0%     589ns ± 0%  -0.12%  (p=0.000 n=30+23)
      RegexpMatchMedium_1K-4      162µs ± 0%     162µs ± 0%    ~     (p=0.318 n=28+25)
      RegexpMatchHard_32-4       9.56µs ± 0%    9.56µs ± 0%    ~     (p=0.072 n=30+29)
      RegexpMatchHard_1K-4        287µs ± 0%     287µs ± 0%  -0.02%  (p=0.005 n=28+28)
      Revcomp-4                   2.50s ± 0%     2.51s ± 0%    ~     (p=0.246 n=29+29)
      Template-4                  312ms ± 1%     313ms ± 1%  +0.46%  (p=0.002 n=30+30)
      TimeParse-4                1.68µs ± 0%    1.67µs ± 0%  -0.31%  (p=0.000 n=27+29)
      TimeFormat-4               1.66µs ± 0%    1.64µs ± 0%  -0.92%  (p=0.000 n=29+26)
      [Geo mean]                  247µs          246µs       -0.15%
      
      name                     old speed      new speed      delta
      GobDecode-4              23.1MB/s ± 1%  23.6MB/s ± 0%  +2.17%  (p=0.000 n=29+28)
      GobEncode-4              26.0MB/s ± 0%  26.3MB/s ± 0%  +1.05%  (p=0.000 n=28+28)
      Gzip-4                   14.0MB/s ± 2%  14.1MB/s ± 1%  +0.47%  (p=0.026 n=30+30)
      Gunzip-4                  139MB/s ± 0%   139MB/s ± 0%    ~     (p=0.624 n=30+28)
      JSONEncode-4             39.1MB/s ± 0%  39.2MB/s ± 0%  +0.24%  (p=0.000 n=30+30)
      JSONDecode-4             7.31MB/s ± 0%  7.23MB/s ± 1%  -1.07%  (p=0.000 n=28+30)
      GoParse-4                3.65MB/s ± 0%  3.62MB/s ± 0%  -0.77%  (p=0.000 n=29+29)
      RegexpMatchEasy0_32-4    84.0MB/s ± 0%  84.1MB/s ± 0%  +0.18%  (p=0.000 n=28+30)
      RegexpMatchEasy0_1K-4     864MB/s ± 0%   861MB/s ± 1%  -0.29%  (p=0.000 n=29+30)
      RegexpMatchEasy1_32-4    89.5MB/s ± 0%  89.5MB/s ± 0%    ~     (p=0.841 n=28+28)
      RegexpMatchEasy1_1K-4     502MB/s ± 0%   500MB/s ± 0%  -0.51%  (p=0.000 n=29+29)
      RegexpMatchMedium_32-4   1.69MB/s ± 0%  1.70MB/s ± 0%  +0.41%  (p=0.000 n=26+30)
      RegexpMatchMedium_1K-4   6.31MB/s ± 0%  6.30MB/s ± 0%    ~     (p=0.129 n=30+25)
      RegexpMatchHard_32-4     3.35MB/s ± 0%  3.35MB/s ± 0%    ~     (p=0.657 n=30+29)
      RegexpMatchHard_1K-4     3.57MB/s ± 0%  3.57MB/s ± 0%    ~     (all equal)
      Revcomp-4                 102MB/s ± 0%   101MB/s ± 0%    ~     (p=0.213 n=29+29)
      Template-4               6.22MB/s ± 1%  6.19MB/s ± 1%  -0.42%  (p=0.005 n=30+29)
      [Geo mean]               24.1MB/s       24.2MB/s       +0.08%
      
      Change-Id: I6c02d3c9975f6bd8bc215cb1fc14d29602b45649
      Reviewed-on: https://go-review.googlesource.com/138095
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      d60cf39f
    • Clément Chigot's avatar
      go/build, runtime/internal/sys: add GOOS=aix · bf8e6b70
      Clément Chigot authored
      This is the first commit of a series that will add AIX as an
      operating system target for ppc64 architecture.
      
      Updates #25893
      
      Change-Id: I865b67a9c98277c11c1a56107be404ac5253277d
      Reviewed-on: https://go-review.googlesource.com/138115
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      bf8e6b70
    • Chris Broadfoot's avatar
      doc: add go1.11 to contrib.html · 38861b51
      Chris Broadfoot authored
      Missing from https://golang.org/project
      
      Change-Id: I6cb769ae861a81f0264bae624b5fe8d70aa92497
      Reviewed-on: https://go-review.googlesource.com/138355Reviewed-by: default avatarDave Cheney <dave@cheney.net>
      38861b51
    • Ian Davis's avatar
      all: remove repeated "the" from comments · d3dcd891
      Ian Davis authored
      A simple grep over the codebase for "the the" which is often
      missed by humans.
      
      Change-Id: Ie4b4f07abfc24c73dcd51c8ef1edf4f73514a21c
      Reviewed-on: https://go-review.googlesource.com/138335Reviewed-by: default avatarDave Cheney <dave@cheney.net>
      d3dcd891
  2. 27 Sep, 2018 14 commits
  3. 26 Sep, 2018 11 commits
    • Tim Cooper's avatar
      image: make RegisterFormat safe for concurrent use · 10aeb672
      Tim Cooper authored
      Fixes #25884
      
      Change-Id: I5478846ef78aecac32078ea8c3248db52f1bb534
      Reviewed-on: https://go-review.googlesource.com/118755Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      10aeb672
    • Ian Gudger's avatar
      net: fail fast for DNS rcode success with no answers of requested type · 94f48ddb
      Ian Gudger authored
      DNS responses which do not contain answers of the requested type return
      errNoSuchHost, the same error as rcode name error. Prior to
      golang.org/cl/37879, both cases resulted in no additional name servers
      being consulted for the question. That CL changed the behavior for both
      cases. Issue #25336 was filed about the rcode name error case and
      golang.org/cl/113815 fixed it. This CL fixes the no answers of requested
      type case as well.
      
      Fixes #27525
      
      Change-Id: I52fadedcd195f16adf62646b76bea2ab3b15d117
      Reviewed-on: https://go-review.googlesource.com/133675
      Run-TryBot: Ian Gudger <igudger@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      94f48ddb
    • Brad Fitzpatrick's avatar
      all: use strings.ReplaceAll and bytes.ReplaceAll where applicable · da0d1a44
      Brad Fitzpatrick authored
      I omitted vendor directories and anything necessary for bootstrapping.
      (Tested by bootstrapping with Go 1.4)
      
      Updates #27864
      
      Change-Id: I7d9b68d0372d3a34dee22966cca323513ece7e8a
      Reviewed-on: https://go-review.googlesource.com/137856
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      da0d1a44
    • Keith Randall's avatar
      reflect: use correct write barrier operations for method funcs · e35a4126
      Keith Randall authored
      Fix the code to use write barriers on heap memory, and no
      write barriers on stack memory.
      
      These errors were discoverd as part of fixing #27695. They may
      have something to do with that issue, but hard to be sure.
      The core cause is different, so this fix is a separate CL.
      
      Update #27695
      
      Change-Id: Ib005f6b3308de340be83c3d07d049d5e316b1e3c
      Reviewed-on: https://go-review.googlesource.com/137438Reviewed-by: default avatarAustin Clements <austin@google.com>
      e35a4126
    • Brad Fitzpatrick's avatar
      bytes, strings: add ReplaceAll · ebdc0b8d
      Brad Fitzpatrick authored
      Credit to Harald Nordgren for the proposal in
      https://golang.org/cl/137456 and #27864.
      
      Fixes #27864
      
      Change-Id: I80546683b0623124fe4627a71af88add2f6c1c27
      Reviewed-on: https://go-review.googlesource.com/137855Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      ebdc0b8d
    • Austin Clements's avatar
      runtime: rename _MSpan* constants to mSpan* · 5a8c11ce
      Austin Clements authored
      We already aliased mSpanInUse to _MSpanInUse. The dual constants are
      getting annoying, so fix all of these to use the mSpan* naming
      convention.
      
      This was done automatically with:
        sed -i -re 's/_?MSpan(Dead|InUse|Manual|Free)/mSpan\1/g' *.go
      plus deleting the existing definition of mSpanInUse.
      
      Change-Id: I09979d9d491d06c10689cea625dc57faa9cc6767
      Reviewed-on: https://go-review.googlesource.com/137875
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5a8c11ce
    • Brian Kessler's avatar
      cmd/compile: intrinsify math/bits.Mul · 9eb53ab9
      Brian Kessler authored
      Add SSA rules to intrinsify Mul/Mul64 (AMD64 and ARM64).
      SSA rules for other functions and architectures are left as a future
      optimization.  Benchmark results on AMD64/ARM64 before and after SSA
      implementation are below.
      
      amd64
      name     old time/op  new time/op  delta
      Add-4    1.78ns ± 0%  1.85ns ±12%     ~     (p=0.397 n=4+5)
      Add32-4  1.71ns ± 1%  1.70ns ± 0%     ~     (p=0.683 n=5+5)
      Add64-4  1.80ns ± 2%  1.77ns ± 0%   -1.22%  (p=0.048 n=5+5)
      Sub-4    1.78ns ± 0%  1.78ns ± 0%     ~     (all equal)
      Sub32-4  1.78ns ± 1%  1.78ns ± 0%     ~     (p=1.000 n=5+5)
      Sub64-4  1.78ns ± 1%  1.78ns ± 0%     ~     (p=0.968 n=5+4)
      Mul-4    11.5ns ± 1%   1.8ns ± 2%  -84.39%  (p=0.008 n=5+5)
      Mul32-4  1.39ns ± 0%  1.38ns ± 3%     ~     (p=0.175 n=5+5)
      Mul64-4  6.85ns ± 1%  1.78ns ± 1%  -73.97%  (p=0.008 n=5+5)
      Div-4    57.1ns ± 1%  56.7ns ± 0%     ~     (p=0.087 n=5+5)
      Div32-4  18.0ns ± 0%  18.0ns ± 0%     ~     (all equal)
      Div64-4  56.4ns ±10%  53.6ns ± 1%     ~     (p=0.071 n=5+5)
      
      arm64
      name      old time/op  new time/op  delta
      Add-96    5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Add32-96  5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Add64-96  5.52ns ± 0%  5.51ns ± 0%     ~     (p=0.444 n=5+5)
      Sub-96    5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Sub32-96  5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Sub64-96  5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Mul-96    34.6ns ± 0%   5.0ns ± 0%  -85.52%  (p=0.008 n=5+5)
      Mul32-96  4.51ns ± 0%  4.51ns ± 0%     ~     (all equal)
      Mul64-96  21.1ns ± 0%   5.0ns ± 0%  -76.26%  (p=0.008 n=5+5)
      Div-96    64.7ns ± 0%  64.7ns ± 0%     ~     (all equal)
      Div32-96  17.0ns ± 0%  17.0ns ± 0%     ~     (all equal)
      Div64-96  53.1ns ± 0%  53.1ns ± 0%     ~     (all equal)
      
      Updates #24813
      
      Change-Id: I9bda6d2102f65cae3d436a2087b47ed8bafeb068
      Reviewed-on: https://go-review.googlesource.com/129415
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      9eb53ab9
    • Brad Fitzpatrick's avatar
      Revert "net/url: escape URL.RawQuery on Parse if it contains invalid characters" · b50210f5
      Brad Fitzpatrick authored
      This reverts commit CL 99135 (git rev 1040626c).
      
      Reason for revert: breaks valid code; see #27302
      
      Fixes #27302
      Updates #22907
      
      Change-Id: I82bb0c28ae1683140c71e7a2224c4ded3f4acea1
      Reviewed-on: https://go-review.googlesource.com/137716Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      b50210f5
    • Alberto Donizetti's avatar
      cmd/compile: update TestNexting golden file · 541f9c03
      Alberto Donizetti authored
      This change updates the expected output of the gdb debugging session
      in the TestNexting internal/ssa test, aligning it with the changes
      introduced in CL 134555.
      
      Fixes #27863
      
      Change-Id: I29e747930c7668b429e8936ad230c4d6aa24fdac
      Reviewed-on: https://go-review.googlesource.com/137455Reviewed-by: default avatarThan McIntosh <thanm@google.com>
      541f9c03
    • Tom Thorogood's avatar
      strings: use Builder in ToUpper and ToLower · 14e7f174
      Tom Thorogood authored
      Map was optimized to use Builder in 45c7d808, which avoided the []byte
      to string converstion. This left the ToUpper and ToLower ASCII fast path
      with an extra allocation over Map.
      
      name                                        old time/op    new time/op    delta
      ToUpper/#00-12                                3.59ns ± 4%    3.71ns ± 1%     ~     (p=0.056 n=5+5)
      ToUpper/ONLYUPPER-12                          11.8ns ± 2%    10.5ns ± 2%  -10.85%  (p=0.008 n=5+5)
      ToUpper/abc-12                                31.8ns ± 1%    25.3ns ± 1%  -20.40%  (p=0.008 n=5+5)
      ToUpper/AbC123-12                             46.2ns ± 7%    31.9ns ± 8%  -30.89%  (p=0.008 n=5+5)
      ToUpper/azAZ09_-12                            47.1ns ± 8%    32.6ns ± 4%  -30.77%  (p=0.008 n=5+5)
      ToUpper/longStrinGwitHmixofsmaLLandcAps-12     137ns ±15%     104ns ±11%  -24.11%  (p=0.008 n=5+5)
      ToUpper/longɐstringɐwithɐnonasciiⱯchars-12     231ns ± 1%     228ns ± 1%     ~     (p=0.079 n=5+5)
      ToUpper/ɐɐɐɐɐ-12                               207ns ± 3%     206ns ± 1%     ~     (p=0.913 n=5+5)
      ToUpper/a\u0080\U0010ffff-12                  90.8ns ± 1%    89.6ns ± 1%   -1.30%  (p=0.024 n=5+5)
      ToLower/#00-12                                3.59ns ± 1%    4.26ns ± 2%  +18.66%  (p=0.008 n=5+5)
      ToLower/abc-12                                6.32ns ± 1%    6.62ns ± 1%   +4.72%  (p=0.008 n=5+5)
      ToLower/AbC123-12                             45.0ns ±13%    31.5ns ± 4%  -29.89%  (p=0.008 n=5+5)
      ToLower/azAZ09_-12                            48.8ns ± 6%    33.2ns ± 3%  -31.91%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps-12     149ns ±13%      98ns ± 8%  -34.30%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS-12     237ns ± 4%     237ns ± 2%     ~     (p=0.635 n=5+5)
      ToLower/ⱭⱭⱭⱭⱭ-12                               181ns ± 1%     181ns ± 1%     ~     (p=0.762 n=5+5)
      ToLower/A\u0080\U0010ffff-12                  90.6ns ± 1%    92.5ns ± 1%   +2.05%  (p=0.016 n=5+5)
      
      name                                        old alloc/op   new alloc/op   delta
      ToUpper/#00-12                                 0.00B          0.00B          ~     (all equal)
      ToUpper/ONLYUPPER-12                           0.00B          0.00B          ~     (all equal)
      ToUpper/abc-12                                 6.00B ± 0%     3.00B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/AbC123-12                              16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/azAZ09_-12                             16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longStrinGwitHmixofsmaLLandcAps-12     64.0B ± 0%     32.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longɐstringɐwithɐnonasciiⱯchars-12     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      ToUpper/ɐɐɐɐɐ-12                               48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      ToUpper/a\u0080\U0010ffff-12                   16.0B ± 0%     16.0B ± 0%     ~     (all equal)
      ToLower/#00-12                                 0.00B          0.00B          ~     (all equal)
      ToLower/abc-12                                 0.00B          0.00B          ~     (all equal)
      ToLower/AbC123-12                              16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/azAZ09_-12                             16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps-12     64.0B ± 0%     32.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS-12     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      ToLower/ⱭⱭⱭⱭⱭ-12                               32.0B ± 0%     32.0B ± 0%     ~     (all equal)
      ToLower/A\u0080\U0010ffff-12                   16.0B ± 0%     16.0B ± 0%     ~     (all equal)
      
      name                                        old allocs/op  new allocs/op  delta
      ToUpper/#00-12                                  0.00           0.00          ~     (all equal)
      ToUpper/ONLYUPPER-12                            0.00           0.00          ~     (all equal)
      ToUpper/abc-12                                  2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/AbC123-12                               2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/azAZ09_-12                              2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longStrinGwitHmixofsmaLLandcAps-12      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longɐstringɐwithɐnonasciiⱯchars-12      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToUpper/ɐɐɐɐɐ-12                                2.00 ± 0%      2.00 ± 0%     ~     (all equal)
      ToUpper/a\u0080\U0010ffff-12                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToLower/#00-12                                  0.00           0.00          ~     (all equal)
      ToLower/abc-12                                  0.00           0.00          ~     (all equal)
      ToLower/AbC123-12                               2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/azAZ09_-12                              2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps-12      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS-12      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToLower/ⱭⱭⱭⱭⱭ-12                                1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToLower/A\u0080\U0010ffff-12                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      
      Updates #26304
      
      Change-Id: I4179e21d5e60d950b925fe3ffc74b376b82812d2
      GitHub-Last-Rev: 2c7c3bb75b8fb16fed5f0c8979ee9941675ed6bf
      GitHub-Pull-Request: golang/go#27872
      Reviewed-on: https://go-review.googlesource.com/137575
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      14e7f174
    • Ingo Oeser's avatar
      net/http: configure http2 transport only once · 1058aecf
      Ingo Oeser authored
      it looks like we should abort trying to configure the http2 transport
      again, once it has been configured already.
      
      Otherwise there will be no effect of these checks and changes, as they
      will be overridden later again and the disable logic below will have no
      effect, too.
      
      So it really looks like we just forgot a return statement here.
      
      Change-Id: Ic99b3bbc662a4e1e1bdbde77681bd1ae597255ad
      Reviewed-on: https://go-review.googlesource.com/134795Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      1058aecf
  4. 25 Sep, 2018 7 commits
    • Michael McLoughlin's avatar
      crypto/cipher: 8K benchmarks for AES stream modes · 4a0dad21
      Michael McLoughlin authored
      Some parallelizable cipher modes may achieve peak performance for larger
      block sizes. For this reason the AES-GCM mode already has an 8K
      benchmark alongside the 1K version. This change introduces 8K benchmarks
      for additional AES stream cipher modes.
      
      Updates #20967
      
      Change-Id: If97c6fbf31222602dcc200f8f418d95908ec1202
      Reviewed-on: https://go-review.googlesource.com/136897Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarFilippo Valsorda <filippo@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4a0dad21
    • Ian Lance Taylor's avatar
      go/build: support Import of local import path in standard library for gccgo · 699da6bd
      Ian Lance Taylor authored
      It's possible for a local import path to refer to a standard library
      package. This was not being correctly handled for gccgo. When using
      gccgo, change the code to permit the existing lexical test, and to
      accept a missing directory for a standard package found via a local
      impor path.
      
      Change-Id: Ia9829e55c0ff62e7d1f01a1d6dc9fcff521501ca
      Reviewed-on: https://go-review.googlesource.com/137439
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      699da6bd
    • Ian Lance Taylor's avatar
      cmd/go: use internal/goroot to check for a standard library package · 93ad7022
      Ian Lance Taylor authored
      Change-Id: I739728f976162a0b8425a93666e3694d967dceb7
      Reviewed-on: https://go-review.googlesource.com/137436
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      93ad7022
    • Ian Lance Taylor's avatar
      go/build: move isStandardPackage to new internal/goroot package · b83ef36d
      Ian Lance Taylor authored
      The module code in cmd/go sometimes needs to know whether it is
      looking at a standard package, and currently uses gc-specific code for
      that. This CL moves the existing isStandardPackage code in the
      go/build package, which works for both gc and gccgo, into a new
      internal/goroot package so that cmd/go can call it. The changes to
      cmd/go will be in a subsequent CL.
      
      Change-Id: Ic1ce4c022a932c6b3e99fa062631577085cc6ecb
      Reviewed-on: https://go-review.googlesource.com/137435
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b83ef36d
    • Carlos Eduardo Seo's avatar
      internal/bytealg: improve performance of IndexByte for ppc64x · 23f75541
      Carlos Eduardo Seo authored
      Use addi+lvx instruction fusion and remove register dependencies in
      the main loop to improve performance.
      
      benchmark                      old ns/op     new ns/op     delta
      BenchmarkIndexByte/10-192      9.86          9.75          -1.12%
      BenchmarkIndexByte/32-192      15.6          11.2          -28.21%
      BenchmarkIndexByte/4K-192      155           97.6          -37.03%
      BenchmarkIndexByte/4M-192      171790        129650        -24.53%
      BenchmarkIndexByte/64M-192     6530982       5018424       -23.16%
      
      benchmark                      old MB/s     new MB/s     speedup
      BenchmarkIndexByte/10-192      1013.72      1025.76      1.01x
      BenchmarkIndexByte/32-192      2049.47      2868.01      1.40x
      BenchmarkIndexByte/4K-192      26422.69     41975.67     1.59x
      BenchmarkIndexByte/4M-192      24415.17     32350.74     1.33x
      BenchmarkIndexByte/64M-192     10275.46     13372.50     1.30x
      
      Change-Id: Iedf17f01f374d58e85dcd6a972209bfcb7eb6063
      Reviewed-on: https://go-review.googlesource.com/137415
      Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarLynn Boger <laboger@linux.vnet.ibm.com>
      23f75541
    • Ian Davis's avatar
      image/draw: optimize bounds checks in loops · 5bba5053
      Ian Davis authored
      Use subslices with known length and cap to give bounds checking hints
      to the compiler. Improves over the earlier pointer based optimizations
      in https://go-review.googlesource.com/c/go/+/14093 for GlyphOver but
      not for FillOver so the latter is left unchanged.
      
      See #27857 for discussion of small caps used in subslices.
      
      name               old time/op  new time/op  delta
      FillOver-8          607µs ± 1%   609µs ± 1%     ~     (p=0.447 n=9+10)
      FillSrc-8          23.0µs ± 1%  22.9µs ± 2%     ~     (p=0.412 n=9+10)
      CopyOver-8          647µs ± 0%   560µs ± 0%  -13.43%  (p=0.000 n=9+10)
      CopySrc-8          19.3µs ± 1%  19.1µs ± 2%   -0.66%  (p=0.029 n=10+10)
      NRGBAOver-8         697µs ± 1%   651µs ± 1%   -6.64%  (p=0.000 n=10+10)
      NRGBASrc-8          405µs ± 1%   347µs ± 0%  -14.23%  (p=0.000 n=10+10)
      YCbCr-8             432µs ± 2%   431µs ± 1%     ~     (p=0.764 n=10+9)
      Gray-8              164µs ± 1%   139µs ± 1%  -15.44%  (p=0.000 n=10+10)
      CMYK-8              498µs ± 0%   461µs ± 0%   -7.49%  (p=0.000 n=10+9)
      GlyphOver-8         220µs ± 0%   199µs ± 0%   -9.52%  (p=0.000 n=9+10)
      RGBA-8             3.81ms ± 5%  3.79ms ± 5%     ~     (p=0.549 n=9+10)
      Paletted-8         1.73ms ± 0%  1.73ms ± 1%     ~     (p=0.278 n=10+9)
      GenericOver-8      11.0ms ± 2%  11.0ms ± 1%     ~     (p=0.842 n=9+10)
      GenericMaskOver-8  5.29ms ± 1%  5.30ms ± 0%     ~     (p=0.182 n=9+10)
      GenericSrc-8       4.24ms ± 1%  4.24ms ± 0%     ~     (p=0.436 n=9+9)
      GenericMaskSrc-8   7.89ms ± 1%  7.90ms ± 2%     ~     (p=0.631 n=10+10)
      
      Change-Id: I6fe1b21bb5e255826cbfdd2e73efd5858cd5557c
      Reviewed-on: https://go-review.googlesource.com/136935Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5bba5053
    • Lynn Boger's avatar
      runtime: improve CALLFN macro for ppc64x · e9456239
      Lynn Boger authored
      The previous CALLFN macro was copying a single byte at a
      time which is extremely inefficient on ppc64x. This changes
      the macro so it copies 8 bytes at a time.
      
      benchmark in reflect:
      name                      old time/op    new time/op    delta
      Call-8                       177ns ± 0%     165ns ± 0%    -6.78%  (p=1.000 n=1+1)
      CallArgCopy/size=128-8       194ns ± 0%     140ns ± 0%   -27.84%  (p=1.000 n=1+1)
      CallArgCopy/size=256-8       253ns ± 0%     159ns ± 0%   -37.15%  (p=1.000 n=1+1)
      CallArgCopy/size=1024-8      612ns ± 0%     222ns ± 0%   -63.73%  (p=1.000 n=1+1)
      CallArgCopy/size=4096-8     2.14µs ± 0%    0.53µs ± 0%   -75.01%  (p=1.000 n=1+1)
      CallArgCopy/size=65536-8    33.0µs ± 0%     7.3µs ± 0%   -77.72%  (p=1.000 n=1+1)
      
      Change-Id: I71f6ee788264e61bb072264d21b77b83592c9dca
      Reviewed-on: https://go-review.googlesource.com/134635
      Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
      Reviewed-by: default avatarMichael Munday <mike.munday@ibm.com>
      e9456239