1. 26 Apr, 2017 9 commits
  2. 25 Apr, 2017 27 commits
  3. 24 Apr, 2017 4 commits
    • Josh Bleecher Snyder's avatar
      cmd/compile: remove references to *os.File from ssa package · 4ee934ad
      Josh Bleecher Snyder authored
      This reduces the size of the ssa export data
      by 10%, from 76154 to 67886.
      
      It doesn't appear that #20084, which would do this automatically,
      is going to be fixed soon. Do it manually for now.
      
      This speeds up compiling cmd/compile/internal/amd64
      and presumably its comrades as well:
      
      name          old time/op       new time/op       delta
      CompileAMD64       89.6ms ± 6%       86.7ms ± 5%  -3.29%  (p=0.000 n=49+47)
      
      name          old user-time/op  new user-time/op  delta
      CompileAMD64        116ms ± 5%        112ms ± 5%  -3.51%  (p=0.000 n=45+42)
      
      name          old alloc/op      new alloc/op      delta
      CompileAMD64       26.7MB ± 0%       25.8MB ± 0%  -3.26%  (p=0.008 n=5+5)
      
      name          old allocs/op     new allocs/op     delta
      CompileAMD64         223k ± 0%         213k ± 0%  -4.46%  (p=0.008 n=5+5)
      
      Updates #20084
      
      Change-Id: I49e8951c5bfce63ad2b7f4fc3bfa0868c53114f9
      Reviewed-on: https://go-review.googlesource.com/41493
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      4ee934ad
    • Robert Griesemer's avatar
      cmd/compile: move typepkg back to gc package (cleanup) · cdeda796
      Robert Griesemer authored
      Change-Id: I4d5c54d2dceabf4630e5e642835b20c8c6890524
      Reviewed-on: https://go-review.googlesource.com/41616
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      cdeda796
    • Josselin Costanzi's avatar
      encoding/base64: Optimize DecodeString · 31c96fc2
      Josselin Costanzi authored
      Optimize DecodeString for the common case where most of the input isn't
      a newline or a padding character.
      Also add some testcases found when fuzzing this implementation against
      upstream.
      Change Decode benchmark to run with different input sizes.
      
      name                 old time/op    new time/op    delta
      DecodeString/2-4       71.5ns ± 4%    70.0ns ± 6%     ~     (p=0.246 n=5+5)
      DecodeString/4-4        112ns ±25%      91ns ± 2%     ~     (p=0.056 n=5+5)
      DecodeString/8-4        136ns ± 5%     126ns ± 5%   -7.33%  (p=0.016 n=5+5)
      DecodeString/64-4       872ns ±29%     652ns ±21%  -25.23%  (p=0.032 n=5+5)
      DecodeString/8192-4    90.9µs ±21%    61.0µs ±13%  -32.87%  (p=0.008 n=5+5)
      
      name                 old speed      new speed      delta
      DecodeString/2-4     56.0MB/s ± 4%  57.2MB/s ± 6%     ~     (p=0.310 n=5+5)
      DecodeString/4-4     73.4MB/s ±23%  87.7MB/s ± 2%     ~     (p=0.056 n=5+5)
      DecodeString/8-4     87.8MB/s ± 5%  94.8MB/s ± 5%   +7.98%  (p=0.016 n=5+5)
      DecodeString/64-4     103MB/s ±24%   136MB/s ±19%  +32.63%  (p=0.032 n=5+5)
      DecodeString/8192-4   122MB/s ±19%   180MB/s ±11%  +47.75%  (p=0.008 n=5+5)
      
      Improves #19636
      
      Change-Id: I39667f4fb682a12b3137946d017ad999553c5780
      Reviewed-on: https://go-review.googlesource.com/34950Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      31c96fc2
    • Andrew Benton's avatar
      encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL · d9b1f9e8
      Andrew Benton authored
      There were a number of places in crypto/x509 that used hardcoded
      representations of the ASN.1 NULL type, in both byte slice and
      RawValue struct forms. This change adds two new exported vars to
      the asn1 package for working with ASN.1 NULL in both its forms, and
      converts all usages from the x509 package.
      
      In addition, tests were added to exercise Marshal and Unmarshal on
      both vars.
      
      See #19446 for discussion.
      
      Change-Id: I63dbd0835841ccbc810bd6ec794360a84e933f1e
      Reviewed-on: https://go-review.googlesource.com/38660
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      d9b1f9e8