1. 26 Aug, 2015 8 commits
  2. 25 Aug, 2015 10 commits
  3. 24 Aug, 2015 12 commits
  4. 23 Aug, 2015 2 commits
  5. 22 Aug, 2015 4 commits
    • Andrew Gerrand's avatar
      mime: move examples to external test file · 8ca78562
      Andrew Gerrand authored
      Fixes #11257
      
      Change-Id: I3f75db47b0f8e877d81e3c2dcea01ff747b47685
      Reviewed-on: https://go-review.googlesource.com/13779Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      8ca78562
    • Brad Fitzpatrick's avatar
      cmd/compile: in usage messages, name the binary "compile" instead of "Xg" · b3a508c0
      Brad Fitzpatrick authored
      Fixes #12227
      
      Change-Id: I7c1b93e50736185a641fb637000aae2f15bc04ed
      Reviewed-on: https://go-review.googlesource.com/13820
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      b3a508c0
    • Ingo Oeser's avatar
      html: speed up UnescapeString · 5b920281
      Ingo Oeser authored
      Add benchmarks for for sparsely escaped and densely escaped strings.
      Then speed up the sparse unescaping part heavily by using IndexByte and
      copy to skip the parts containing no escaping very fast.
      
      Unescaping densely escaped strings slower because of
      the new function call overhead. But sparsely encoded strings are seen
      more often in the utf8 enabled web.
      
      We win part of the speed back by looking up entityName differently.
      
      	benchmark                  old ns/op    new ns/op    delta
      	BenchmarkEscape                31680        31396   -0.90%
      	BenchmarkEscapeNone             6507         6872   +5.61%
      	BenchmarkUnescape              36481        48298  +32.39%
      	BenchmarkUnescapeNone            332          325   -2.11%
      	BenchmarkUnescapeSparse         8836         3221  -63.55%
      	BenchmarkUnescapeDense         30639        32224   +5.17%
      
      Change-Id: If606cb01897a40eefe35ba98f2ff23bb25251606
      Reviewed-on: https://go-review.googlesource.com/10172Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5b920281
    • 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
  6. 21 Aug, 2015 4 commits