1. 25 Mar, 2019 18 commits
  2. 24 Mar, 2019 3 commits
    • sergey's avatar
      net/url: check for lowercase before uppercase in shouldEscape · c7bb4533
      sergey authored
      Most chars in URLs are lowercase, so check that first.
      
      Performance change:
      
      String-4               7.62µs ± 1%    7.27µs ± 3%  -4.61%  (p=0.008 n=5+5)
      QueryEscape/#00-4      92.6ns ± 3%    90.3ns ± 1%  -2.48%  (p=0.016 n=5+5)
      QueryEscape/#01-4       515ns ± 4%     510ns ± 2%    ~     (p=0.683 n=5+5)
      QueryEscape/#02-4       375ns ± 1%     343ns ± 1%  -8.52%  (p=0.008 n=5+5)
      QueryEscape/#03-4       758ns ± 1%     699ns ± 1%  -7.83%  (p=0.008 n=5+5)
      QueryEscape/#04-4      6.06µs ± 1%    5.74µs ± 1%  -5.38%  (p=0.008 n=5+5)
      PathEscape/#00-4        140ns ± 1%     135ns ± 2%  -3.85%  (p=0.008 n=5+5)
      PathEscape/#01-4        511ns ± 3%     507ns ± 3%    ~     (p=0.587 n=5+5)
      PathEscape/#02-4        372ns ± 1%     342ns ± 2%  -8.22%  (p=0.008 n=5+5)
      PathEscape/#03-4        747ns ± 1%     685ns ± 1%  -8.30%  (p=0.008 n=5+5)
      PathEscape/#04-4       5.94µs ± 1%    5.64µs ± 3%  -4.98%  (p=0.008 n=5+5)
      QueryUnescape/#00-4     111ns ± 4%     110ns ± 2%    ~     (p=0.952 n=5+5)
      QueryUnescape/#01-4     390ns ± 0%     391ns ± 2%    ~     (p=0.714 n=5+5)
      QueryUnescape/#02-4     297ns ± 5%     295ns ± 3%    ~     (p=0.524 n=5+5)
      QueryUnescape/#03-4     543ns ± 3%     556ns ± 2%  +2.39%  (p=0.032 n=5+5)
      QueryUnescape/#04-4    3.23µs ± 3%    3.22µs ± 2%    ~     (p=1.000 n=5+5)
      PathUnescape/#00-4      111ns ± 1%     110ns ± 3%    ~     (p=0.881 n=5+5)
      PathUnescape/#01-4      389ns ± 2%     386ns ± 2%    ~     (p=0.444 n=5+5)
      PathUnescape/#02-4      297ns ± 1%     295ns ± 3%    ~     (p=0.738 n=5+5)
      PathUnescape/#03-4      557ns ± 3%     553ns ± 2%    ~     (p=0.810 n=5+5)
      PathUnescape/#04-4     2.94µs ± 2%    2.97µs ± 2%    ~     (p=0.222 n=5+5)
      
      Change-Id: I7e6d64cd5f8f5218cb40f52f0015168a8674aabb
      Reviewed-on: https://go-review.googlesource.com/c/go/+/168883Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c7bb4533
    • Alex Brainman's avatar
      cmd/go: keep WINDIR during TestScript · 7722f6d2
      Alex Brainman authored
      TestScript executes PowerShell. And PowerShell appears to require
      WINDIR environment variable to exists on windows-arm.
      
      So keep WINDIR environment variable when running PowerShell.
      
      Fixes #30711
      
      Change-Id: I14dde6614347325a8f3caf994ea8ab05294450a5
      Reviewed-on: https://go-review.googlesource.com/c/go/+/168859
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      7722f6d2
    • Daniel Martí's avatar
      text/template: allow using -}} with many spaces · e770b5b3
      Daniel Martí authored
      lexSpace consumed all spaces, even if the last one was part of a right
      delimiter like " -}}". Thus, "3  -}}" wouldn't lex as "3" and a right
      delimiter, but as "3", "-", and "}}".
      
      To fix that, make lexSpace stop if it encounters a right delimiter.
      
      Fixes #30948.
      
      Change-Id: I80a5546e5809e54f6823e2bf3a57a7e8808329be
      Reviewed-on: https://go-review.googlesource.com/c/go/+/168457Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
      e770b5b3
  3. 23 Mar, 2019 3 commits
  4. 22 Mar, 2019 14 commits
  5. 21 Mar, 2019 2 commits
    • Richard Musiol's avatar
      cmd/link/internal/wasm: optimize data section in wasm binary · 99e22328
      Richard Musiol authored
      This change optimizes the data section in the wasm binary by
      omitting blocks of zeroes and instead emitting data segments
      with offsets skipping the zeroes.
      
      This optimization is inspired by the memory-packing pass of the
      wasm-opt tool and reduces the wasm binary size of "hello world" by 14%.
      
      Change-Id: Iba3043df05bf6aab4745c5f8015c0337fc218aff
      Reviewed-on: https://go-review.googlesource.com/c/go/+/167801
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      99e22328
    • Nigel Tao's avatar
      image/gif: don't assume Encode src's origin is (0, 0) · 4dad64f5
      Nigel Tao authored
      When gif.Encode is given an "m image.Image" argument that isn't an
      *image.Paletted, it creates a temporary *image.Paletted (called pm) that
      is intended to be a copy of this image, only with fewer colors.
      
      That creation process, and specifically the opts.Drawer.Draw call that
      does the copy, incorrectly assumed that m.Bounds().Min is the zero point
      (0, 0). This commit fixes that.
      
      Fixes #30887
      
      Change-Id: Ie03bddec359e2dcc52f18451049452105514e179
      Reviewed-on: https://go-review.googlesource.com/c/go/+/168418
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      4dad64f5