1. 13 Apr, 2019 4 commits
    • Udalov Max's avatar
      crypto/sha1: use math/bits.RotateLeft32 instead of ad-hoc implementation. · 7cd39de2
      Udalov Max authored
      This makes code more idiomatic and shows small performance gains of generic benchmarks.
      
      Updates: #31456
      
      name            old time/op    new time/op    delta
      Hash8Bytes-8       275ns ± 4%     270ns ± 0%    ~     (p=0.213 n=9+8)
      Hash320Bytes-8    1.46µs ± 5%    1.39µs ± 1%  -4.54%  (p=0.000 n=10+10)
      Hash1K-8          3.99µs ± 5%    3.86µs ± 1%  -3.38%  (p=0.023 n=10+10)
      Hash8K-8          28.9µs ± 0%    28.9µs ± 1%    ~     (p=0.315 n=10+10)
      
      name            old speed      new speed      delta
      Hash8Bytes-8    28.8MB/s ± 9%  29.6MB/s ± 0%    ~     (p=0.151 n=10+8)
      Hash320Bytes-8   220MB/s ± 5%   230MB/s ± 1%  +4.65%  (p=0.000 n=10+10)
      Hash1K-8         257MB/s ± 5%   265MB/s ± 1%  +3.38%  (p=0.023 n=10+10)
      Hash8K-8         283MB/s ± 0%   284MB/s ± 1%    ~     (p=0.315 n=10+10)
      
      Change-Id: Iee63aa042614e3bbeda9aaf5236180d4153f03c4
      Reviewed-on: https://go-review.googlesource.com/c/go/+/171729Reviewed-by: default avatarIlya Tokar <tocarip@gmail.com>
      Run-TryBot: Ilya Tokar <tocarip@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7cd39de2
    • Daniel Martí's avatar
      encoding/json: remove a bounds check in readValue · ab2f83c3
      Daniel Martí authored
      readValue is a hot function, clocking in at ~13% flat CPU use in
      CodeDecoder. In particular, looping over the bytes is slow. That's
      partially because the code contains a bounds check at the start of the
      loop.
      
      The source of the problem is that scanp is a signed integer, and comes
      from a field, so the compiler doesn't know that it's non-negative. Help
      it with a simple and comparatively cheap hint.
      
      While at it, use scanp as the index variable directly, removing the need
      for a duplicate index variable which is later added back into scanp.
      
      name           old time/op    new time/op    delta
      CodeDecoder-8    11.3ms ± 1%    11.2ms ± 1%  -0.98%  (p=0.000 n=9+9)
      
      name           old speed      new speed      delta
      CodeDecoder-8   172MB/s ± 1%   174MB/s ± 1%  +0.99%  (p=0.000 n=9+9)
      
      Updates #28923.
      
      Change-Id: I138f83babdf316fc97697cc18f595c3403c1ddb7
      Reviewed-on: https://go-review.googlesource.com/c/go/+/170939
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      ab2f83c3
    • OkamotoYuki's avatar
      cmd/go/internal/test: pass default timeout to test programs if not given from command line · ee64b355
      OkamotoYuki authored
      Make 'go test' command to pass the default timeout (10m) to test programs if the value is not given from command line.
      
      Fixes #28147
      
      Change-Id: I7856e452224a51a92da03bab8e3a0f9d7c41d32a
      GitHub-Last-Rev: 66f9a6f90e9ffe7c58d5c1fe32af84e16ea74ab8
      GitHub-Pull-Request: golang/go#30545
      Reviewed-on: https://go-review.googlesource.com/c/go/+/164963
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      ee64b355
    • Romain Baugue's avatar
      reflect: add Value.IsZero · c40bffd9
      Romain Baugue authored
      Fixes #7501
      
      Change-Id: Iac7c79cd4b30a90b14ed84bf1eba758972232a6c
      Reviewed-on: https://go-review.googlesource.com/c/go/+/171337
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      c40bffd9
  2. 12 Apr, 2019 11 commits
  3. 11 Apr, 2019 11 commits
  4. 10 Apr, 2019 10 commits
  5. 09 Apr, 2019 4 commits