1. 22 Aug, 2015 1 commit
    • Justin Nuß's avatar
      time: Use AppendFormat in Marshal[Text|JSON] · 5f859ba8
      Justin Nuß authored
      The current implementations of MarshalJSON and MarshalText use
      time.Format which returns a string (converted from a byte slice),
      only to convert it back to a byte slice.
      
      Avoid the conversion (and thus an allocation) by directly appending
      the formatted time to a preallocated byte slice, using the new
      AppendFormat function, introduced in golang.org/cl/1760.
      
      This reduces the allocations done in Marshal[Text|JSON] by 50%.
      
      benchmark                old ns/op     new ns/op     delta
      BenchmarkMarshalJSON     626           507           -19.01%
      BenchmarkMarshalText     598           511           -14.55%
      
      benchmark                old allocs     new allocs     delta
      BenchmarkMarshalJSON     2              1              -50.00%
      BenchmarkMarshalText     2              1              -50.00%
      
      benchmark                old bytes     new bytes     delta
      BenchmarkMarshalJSON     96            48            -50.00%
      BenchmarkMarshalText     96            48            -50.00%
      
      Fixes #11025
      
      Change-Id: I468f78d075a6ecc1cdc839df7fb407fbc6ff2e70
      Reviewed-on: https://go-review.googlesource.com/10555Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5f859ba8
  2. 21 Aug, 2015 16 commits
  3. 20 Aug, 2015 2 commits
  4. 19 Aug, 2015 7 commits
  5. 18 Aug, 2015 8 commits
  6. 17 Aug, 2015 2 commits
  7. 16 Aug, 2015 1 commit
    • Dave Cheney's avatar
      cmd/compile/internal/arm64: remove Reginuse check in clearfat · 467a2cb7
      Dave Cheney authored
      Fixes golang/go#12133
      
      CL 13630 fixed the use of a stale reg[] array in the various arch
      backends which was causing the check in clearfat to pass
      unconditionally on arm64.
      
      With this check fixed, arm64 now considers REGRT1 to always be in use
      as it is part of the reserved register set, see arm64/gsubr.go.
      
      However, ppc64 does not consider REGRT1 and REGRT2 to be part of its
      reserved set, so its identical clearfat check passes.
      
      This CL removes the Reginuse check inside clearfat as REGRT1 is
      guarenteed always be free on arm64.
      
      Change-Id: I4719150d3c3378fae155b863c474529df18d4c17
      Reviewed-on: https://go-review.googlesource.com/13650Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      467a2cb7
  8. 15 Aug, 2015 3 commits