1. 08 Mar, 2016 2 commits
  2. 07 Mar, 2016 27 commits
  3. 06 Mar, 2016 9 commits
  4. 05 Mar, 2016 2 commits
    • Martin Möhrmann's avatar
      fmt: use fewer allocations for %q string formatting · 5763476f
      Martin Möhrmann authored
      Reuse the internal buffer and use append versions of
      the strconv quote functions to avoid some allocations.
      
      Add more tests.
      
      name                  old time/op    new time/op    delta
      SprintfQuoteString-2     486ns ± 2%     416ns ± 2%  -14.42%  (p=0.000 n=20+20)
      
      name                  old allocs/op  new allocs/op  delta
      SprintfQuoteString-2      4.00 ± 0%      2.00 ± 0%  -50.00%  (p=0.000 n=20+20)
      
      Change-Id: I63795b51fd95c53c5993ec8e6e99b659941f9f54
      Reviewed-on: https://go-review.googlesource.com/20251
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      5763476f
    • Martin Möhrmann's avatar
      fmt: optimize byte slice and array formatting for %v and %d · 00da3a6e
      Martin Möhrmann authored
      Instead of calling printArg in fmtBytes to format each byte call
      the byte formatting functions directly since it is known each
      element is of type byte.
      
      Add more tests for byte slice and array formatting.
      
      name            old time/op  new time/op  delta
      SprintfBytes-2   843ns ±16%   417ns ±11%  -50.58%  (p=0.000 n=20+20)
      
      Change-Id: I5b907dbf52091e3de9710b09d67649c76f4c17e9
      Reviewed-on: https://go-review.googlesource.com/20176
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      00da3a6e