1. 19 Mar, 2017 5 commits
  2. 18 Mar, 2017 4 commits
  3. 17 Mar, 2017 26 commits
  4. 16 Mar, 2017 5 commits
    • Jeremy Jackins's avatar
      cmd/compile: further clarify assignment count mismatch error message · 73a44f04
      Jeremy Jackins authored
      This is an evolution of https://go-review.googlesource.com/33616, as discussed
      via email with Robert (gri):
      
      $ cat foobar.go
      package main
      
      func main() {
              a := "foo", "bar"
      }
      
      before:
      ./foobar.go:4:4: assignment count mismatch: want 1 values, got 2
      
      after:
      ./foobar.go:4:4: assignment count mismatch: cannot assign 2 values to 1 variables
      
      We could likely also eliminate the "assignment count mismatch" prefix now
      without losing any information, but that string is matched by a number of
      tests.
      
      Change-Id: Ie6fc8a7bbd0ebe841d53e66e5c2f49868decf761
      Reviewed-on: https://go-review.googlesource.com/38313Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      73a44f04
    • Keith Randall's avatar
      cmd/compile: intrinsics for math/bits.{Len,LeadingZeros} · 495b1679
      Keith Randall authored
      name              old time/op  new time/op  delta
      LeadingZeros-4    2.00ns ± 0%  1.34ns ± 1%  -33.02%  (p=0.000 n=8+10)
      LeadingZeros16-4  1.62ns ± 0%  1.57ns ± 0%   -3.09%  (p=0.001 n=8+9)
      LeadingZeros32-4  2.14ns ± 0%  1.48ns ± 0%  -30.84%  (p=0.002 n=8+10)
      LeadingZeros64-4  2.06ns ± 1%  1.33ns ± 0%  -35.08%  (p=0.000 n=8+8)
      
      8-bit args is a special case - the Go code is really fast because
      it is just a single table lookup.  So I've disabled that for now.
      Intrinsics were actually slower:
      LeadingZeros8-4   1.22ns ± 3%  1.58ns ± 1%  +29.56%  (p=0.000 n=10+10)
      
      Update #18616
      
      Change-Id: Ia9c289b9ba59c583ea64060470315fd637e814cf
      Reviewed-on: https://go-review.googlesource.com/38311
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      495b1679
    • Steve Francia's avatar
      doc: reorganize the contribution guidelines into a guide · 5f3e7aa7
      Steve Francia authored
      Updates #17802
      
      Change-Id: I65ea0f4cde973604c04051e7eb25d12e4facecd3
      Reviewed-on: https://go-review.googlesource.com/36626Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarChris Broadfoot <cbro@golang.org>
      5f3e7aa7
    • Aliaksandr Valialkin's avatar
      strconv: optimize formatting for small decimal ints · bc8b9b23
      Aliaksandr Valialkin authored
      Avoid memory allocations by returning pre-calculated strings
      for decimal ints in the range 0..99.
      
      Benchmark results:
      
      name              old time/op    new time/op    delta
      FormatInt-4         2.45µs ± 1%    2.40µs ± 1%    -1.86%  (p=0.000 n=8+9)
      AppendInt-4         1.67µs ± 1%    1.65µs ± 0%    -0.92%  (p=0.000 n=10+10)
      FormatUint-4         676ns ± 3%     669ns ± 1%      ~     (p=0.146 n=10+10)
      AppendUint-4         467ns ± 2%     474ns ± 0%    +1.58%  (p=0.000 n=10+10)
      FormatIntSmall-4    29.6ns ± 2%     3.3ns ± 0%   -88.98%  (p=0.000 n=10+9)
      AppendIntSmall-4    16.0ns ± 1%     8.5ns ± 0%   -46.98%  (p=0.000 n=10+9)
      
      name              old alloc/op   new alloc/op   delta
      FormatInt-4           576B ± 0%      576B ± 0%      ~     (all equal)
      AppendInt-4          0.00B          0.00B           ~     (all equal)
      FormatUint-4          224B ± 0%      224B ± 0%      ~     (all equal)
      AppendUint-4         0.00B          0.00B           ~     (all equal)
      FormatIntSmall-4     2.00B ± 0%     0.00B       -100.00%  (p=0.000 n=10+10)
      AppendIntSmall-4     0.00B          0.00B           ~     (all equal)
      
      name              old allocs/op  new allocs/op  delta
      FormatInt-4           37.0 ± 0%      35.0 ± 0%    -5.41%  (p=0.000 n=10+10)
      AppendInt-4           0.00           0.00           ~     (all equal)
      FormatUint-4          6.00 ± 0%      6.00 ± 0%      ~     (all equal)
      AppendUint-4          0.00           0.00           ~     (all equal)
      FormatIntSmall-4      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
      AppendIntSmall-4      0.00           0.00           ~     (all equal)
      
      Fixes #19445
      
      Change-Id: Ib1f8922f2e0b13743c847ee9e703d1dab77f705c
      Reviewed-on: https://go-review.googlesource.com/37963Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bc8b9b23
    • Keith Randall's avatar
      cmd/compile: intrinsify math/bits.ReverseBytes · dd9892e3
      Keith Randall authored
      Update #18616
      
      Change-Id: I0c2d643cbbeb131b4c9b12194697afa4af48e1d2
      Reviewed-on: https://go-review.googlesource.com/38166
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      dd9892e3