1. 13 Mar, 2017 4 commits
  2. 12 Mar, 2017 2 commits
    • Martin Möhrmann's avatar
      strconv: fix performance regression in integer formatting on 32bit platforms · b71ed4ed
      Martin Möhrmann authored
      Some of the changes in CL golang.org/cl/38071/ assumed that / and %
      could always be combined to use only one DIV instruction. However,
      this is not the case for 64bit operands on a 32bit platform which use
      seperate runtime functions to calculate division and modulo.
      
      This CL restores the original optimizations that help on 32bit platforms
      with negligible impact on 64bit platforms.
      
      386:
      name          old time/op  new time/op  delta
      FormatInt-2   6.06µs ± 0%  6.02µs ± 0%  -0.70%  (p=0.000 n=20+20)
      AppendInt-2   4.98µs ± 0%  4.98µs ± 0%    ~     (p=0.747 n=18+18)
      FormatUint-2  1.93µs ± 0%  1.85µs ± 0%  -4.19%  (p=0.000 n=20+20)
      AppendUint-2  1.71µs ± 0%  1.64µs ± 0%  -3.68%  (p=0.000 n=20+20)
      
      amd64:
      name          old time/op  new time/op  delta
      FormatInt-2   2.41µs ± 0%  2.41µs ± 0%  -0.09%  (p=0.010 n=18+18)
      AppendInt-2   1.77µs ± 0%  1.77µs ± 0%  +0.08%  (p=0.000 n=18+18)
      FormatUint-2   653ns ± 1%   653ns ± 0%    ~     (p=0.178 n=20+20)
      AppendUint-2   514ns ± 0%   513ns ± 0%  -0.13%  (p=0.000 n=20+17)
      
      Change-Id: I574a18e54fb41b25fbe51ce696e7a8765abc79a6
      Reviewed-on: https://go-review.googlesource.com/38051
      Run-TryBot: Martin Möhrmann <moehrmann@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      b71ed4ed
    • Matthew Dempsky's avatar
      cmd/link: eliminate markextra · d3434782
      Matthew Dempsky authored
      This appears to be leftover from when instruction selection happened
      in the linker. Many of the morestackX functions listed don't even
      exist anymore.
      
      Now that we select instructions within the compiler and assembler,
      normal deadcode elimination mechanisms should suffice for these
      symbols.
      
      Change-Id: I2cb1e435101392e7c983957c4acfbbcc87a5ca7d
      Reviewed-on: https://go-review.googlesource.com/38077
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d3434782
  3. 11 Mar, 2017 4 commits
  4. 10 Mar, 2017 9 commits
  5. 09 Mar, 2017 14 commits
  6. 08 Mar, 2017 7 commits
    • Elias Naur's avatar
      go/internal/srcimporter: skip tests on iOS · 3a1271da
      Elias Naur authored
      The iOS test harness only includes the current test directory in its
      app bundles, but the tests need access to all source code.
      
      Change-Id: I8a902b183bc2745b4fbfffef867002d573abb1f5
      Reviewed-on: https://go-review.googlesource.com/37961
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3a1271da
    • Josh Bleecher Snyder's avatar
      runtime: optimize slicebytestostring · 23be7289
      Josh Bleecher Snyder authored
      Inline rawstringtmp and simplify.
      Use memmove instead of copy.
      
      name                     old time/op  new time/op  delta
      SliceByteToString/1-8    19.4ns ± 2%  14.1ns ± 1%  -27.04%  (p=0.000 n=20+17)
      SliceByteToString/2-8    20.8ns ± 2%  15.5ns ± 2%  -25.46%  (p=0.000 n=20+20)
      SliceByteToString/4-8    20.7ns ± 1%  14.9ns ± 1%  -28.30%  (p=0.000 n=20+20)
      SliceByteToString/8-8    23.2ns ± 1%  17.1ns ± 1%  -26.22%  (p=0.000 n=19+19)
      SliceByteToString/16-8   29.4ns ± 1%  23.6ns ± 1%  -19.76%  (p=0.000 n=17+20)
      SliceByteToString/32-8   31.4ns ± 1%  26.0ns ± 1%  -17.11%  (p=0.000 n=16+19)
      SliceByteToString/64-8   36.1ns ± 0%  30.0ns ± 0%  -16.96%  (p=0.000 n=16+16)
      SliceByteToString/128-8  46.9ns ± 0%  38.9ns ± 0%  -17.15%  (p=0.000 n=17+19)
      
      Change-Id: I422e688830e4a9bd21897d1f74964625b735f436
      Reviewed-on: https://go-review.googlesource.com/37791
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMarvin Stenger <marvin.stenger94@gmail.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      23be7289
    • Elias Naur's avatar
      os/user: fake Current on Android · 228438e0
      Elias Naur authored
      On Android devices where the stub fallback for Current fails to
      extract a User from the environment, return a dummy fallback instead
      of failing.
      
      While we're here, use / instead of /home/nacl for the NaCL fallback.
      
      Hopefully fixes the Android builder.
      
      Change-Id: Ia29304fbc224ee5f9c0f4e706d1756f765a7eae5
      Reviewed-on: https://go-review.googlesource.com/37960
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      228438e0
    • Bryan C. Mills's avatar
      runtime: poll libc to deliver signals under TSAN · 29edf0f9
      Bryan C. Mills authored
      fixes #18717
      
      Change-Id: I7244463d2e7489e0b0fe3b74c4b782e71210beb2
      Reviewed-on: https://go-review.googlesource.com/35494
      Run-TryBot: Bryan Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      29edf0f9
    • David Chase's avatar
      cmd/compile: check loop rescheduling with stack bound, not counter · d71f36b5
      David Chase authored
      After benchmarking with a compiler modified to have better
      spill location, it became clear that this method of checking
      was actually faster on (at least) two different architectures
      (ppc64 and amd64) and it also provides more timely interruption
      of loops.
      
      This change adds a modified FOR loop node "FORUNTIL" that
      checks after executing the loop body instead of before (i.e.,
      always at least once).  This ensures that a pointer past the
      end of a slice or array is not made visible to the garbage
      collector.
      
      Without the rescheduling checks inserted, the restructured
      loop from this  change apparently provides a 1% geomean
      improvement on PPC64 running the go1 benchmarks; the
      improvement on AMD64 is only 0.12%.
      
      Inserting the rescheduling check exposed some peculiar bug
      with the ssa test code for s390x; this was updated based on
      initial code actually generated for GOARCH=s390x to use
      appropriate OpArg, OpAddr, and OpVarDef.
      
      NaCl is disabled in testing.
      
      Change-Id: Ieafaa9a61d2a583ad00968110ef3e7a441abca50
      Reviewed-on: https://go-review.googlesource.com/36206
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      d71f36b5
    • Kevin Burke's avatar
      database/sql: fix spelling mistake in tests · 6fbedc1a
      Kevin Burke authored
      Change-Id: I04e150d4e4123aad2f277e5c6e9f2abd15628a28
      Reviewed-on: https://go-review.googlesource.com/37941Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      6fbedc1a
    • Robert Griesemer's avatar
      cmd/compile: fix recorded export data position info · 2123a6c6
      Robert Griesemer authored
      The position information recorded now consists of the line-
      directive relative filename and line number. It would be
      relatively easy to also encode absolute position information
      as necessary (by serializing src.PosBase data).
      
      For example, given $GOROOT/src/tmp/x.go:
      
      	package p
      
      	const C0 = 0
      
      	//line c.go:10
      	const C1 = 1
      
      	//line t.go:20
      	type T int
      
      	//line v.go:30
      	var V T
      
      	//line f.go:40
      	func F() {}
      
      The recorded positions for the exported entities are:
      
      	C0 $GOROOT/src/tmp/x.go 3
      	C1 c.go 10
      	T t.go 20
      	V v.go 30
      	F f.go 40
      
      Fix verified by manual inspection. There's currently no easy way
      to test this, but it will eventually be tested when we fix #7311.
      
      Fixes #19391.
      
      Change-Id: I6269067ea58358250fe6dd1f73bdf9e5d2adfe3d
      Reviewed-on: https://go-review.googlesource.com/37936Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      2123a6c6