1. 25 Oct, 2017 3 commits
  2. 24 Oct, 2017 19 commits
  3. 23 Oct, 2017 5 commits
  4. 22 Oct, 2017 2 commits
  5. 21 Oct, 2017 7 commits
  6. 20 Oct, 2017 4 commits
    • Tim Cooper's avatar
      encoding/hex: add NewEncoder, NewDecoder · 6db4950d
      Tim Cooper authored
      NewEncoder returns an io.Writer that writes all incoming bytes as
      hexadecimal characters to the underlying io.Writer. NewDecoder returns an
      io.Reader that does the inverse.
      
      Fixes #21590
      
      Change-Id: Iebe0813faf365b42598f19a9aa41768f571dc0a8
      Reviewed-on: https://go-review.googlesource.com/70210Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6db4950d
    • David Crawshaw's avatar
      cmd/link: move Iself global to ctxt · d05f82a1
      David Crawshaw authored
      For #22095
      
      Change-Id: Iba3dffc782cecc15ea0e90a971a2734729984945
      Reviewed-on: https://go-review.googlesource.com/70834
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      d05f82a1
    • David Crawshaw's avatar
      cmd/link: move FlagLinkshared global to ctxt · 6738c494
      David Crawshaw authored
      For #22095
      
      Change-Id: Ica6b3391541fe5a0355620d7c4a5107cf53eee82
      Reviewed-on: https://go-review.googlesource.com/70833
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6738c494
    • Joe Tsai's avatar
      encoding/csv: simplify and optimize Reader · 89ccfe49
      Joe Tsai authored
      The Reader implementation is slow because it operates on a rune-by-rune
      basis via bufio.Reader.ReadRune. We speed this up by operating on entire
      lines that we read from bufio.Reader.ReadSlice.
      
      In order to ensure that we read the full line, we augment ReadSlice
      in our Reader.readLine method to automatically expand the slice if
      bufio.ErrBufferFull is every hit.
      
      This change happens to fix #19410 because it no longer relies on
      rune-by-rune parsing and only searches for the relevant delimiter rune.
      
      In order to keep column accounting simple and consistent, this change
      reverts parts of CL 52830.
      
      This CL is an alternative to CL 36270 and builds on some of the ideas
      from that change by Diogo Pinela.
      
      name                                     old time/op    new time/op    delta
      Read-8                                   3.12µs ± 1%    2.54µs ± 2%  -18.76%   (p=0.000 n=10+9)
      ReadWithFieldsPerRecord-8                3.12µs ± 1%    2.53µs ± 1%  -18.91%    (p=0.000 n=9+9)
      ReadWithoutFieldsPerRecord-8             3.13µs ± 0%    2.57µs ± 3%  -18.07%  (p=0.000 n=10+10)
      ReadLargeFields-8                        52.3µs ± 1%     5.3µs ± 2%  -89.93%   (p=0.000 n=10+9)
      ReadReuseRecord-8                        2.05µs ± 1%    1.40µs ± 1%  -31.48%   (p=0.000 n=10+9)
      ReadReuseRecordWithFieldsPerRecord-8     2.05µs ± 1%    1.41µs ± 0%  -31.03%   (p=0.000 n=10+9)
      ReadReuseRecordWithoutFieldsPerRecord-8  2.06µs ± 1%    1.40µs ± 1%  -31.70%   (p=0.000 n=9+10)
      ReadReuseRecordLargeFields-8             50.9µs ± 0%     4.1µs ± 3%  -92.01%  (p=0.000 n=10+10)
      
      name                                     old alloc/op   new alloc/op
      Read-8                                       664B ± 0%      664B ± 0%
      ReadWithFieldsPerRecord-8                    664B ± 0%      664B ± 0%
      ReadWithoutFieldsPerRecord-8                 664B ± 0%      664B ± 0%
      ReadLargeFields-8                          3.94kB ± 0%    3.94kB ± 0%
      ReadReuseRecord-8                           24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordWithFieldsPerRecord-8        24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordWithoutFieldsPerRecord-8     24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordLargeFields-8               2.98kB ± 0%    2.98kB ± 0%
      
      name                                     old allocs/op  new allocs/op
      Read-8                                       18.0 ± 0%      18.0 ± 0%
      ReadWithFieldsPerRecord-8                    18.0 ± 0%      18.0 ± 0%
      ReadWithoutFieldsPerRecord-8                 18.0 ± 0%      18.0 ± 0%
      ReadLargeFields-8                            24.0 ± 0%      24.0 ± 0%
      ReadReuseRecord-8                            8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordWithFieldsPerRecord-8         8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordWithoutFieldsPerRecord-8      8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordLargeFields-8                 12.0 ± 0%      12.0 ± 0%
      
      Updates #22352
      Updates #19019
      Fixes #16791
      Fixes #19410
      
      Change-Id: I31c27cfcc56880e6abac262f36c947179b550bbf
      Reviewed-on: https://go-review.googlesource.com/72150Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      89ccfe49