1. 16 Nov, 2015 1 commit
    • Marcel van Lohuizen's avatar
      unicode/utf8: removed uses of ranging over string · 9b299c1e
      Marcel van Lohuizen authored
      Ranging over string is much slower than using DecodeRuneInString.
      See golang.org/issue/13162.
      
      Replacing ranging over a string with the implementation of the Bytes
      counterpart results in the following performance improvements:
      
      RuneCountInStringTenASCIIChars-8     43.0ns ± 1%  16.4ns ± 2%  -61.80%  (p=0.000 n=7+8)
      RuneCountInStringTenJapaneseChars-8   161ns ± 2%   154ns ± 2%   -4.58%  (p=0.000 n=8+8)
      ValidStringTenASCIIChars-8           52.2ns ± 1%  13.2ns ± 1%  -74.62%  (p=0.001 n=7+7)
      ValidStringTenJapaneseChars-8         173ns ± 2%   153ns ± 2%  -11.78%  (p=0.000 n=7+8)
      
      Update golang/go#13162
      
      Change-Id: Ifc40a6a94bb3317f1f2d929d310bd2694645e9f6
      Reviewed-on: https://go-review.googlesource.com/16695Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      9b299c1e
  2. 15 Nov, 2015 7 commits
  3. 14 Nov, 2015 12 commits
  4. 13 Nov, 2015 20 commits
    • Matthew Dempsky's avatar
      runtime: remove zgoarch_*.go files · 06eb504c
      Matthew Dempsky authored
      These now live in runtime/internal/sys.
      
      Change-Id: I270597142516512bfc1395419e51d8083ba1663f
      Reviewed-on: https://go-review.googlesource.com/16891
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      06eb504c
    • Marcel van Lohuizen's avatar
      net/rpc: verify that embedding works with changed semantics · b4c9ec8b
      Marcel van Lohuizen authored
      Exported methods of unexported embedded structs get added
      correctly to the pool. Behavior is unchanged before and after
      https://golang.org/cl/14085.
      
      Change-Id: I2b4053bab02ff045f0a4577b8114808a60aae27e
      Reviewed-on: https://go-review.googlesource.com/16305Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      b4c9ec8b
    • Brad Fitzpatrick's avatar
      A+C: add Steve Newman (Google CLA) · f762d0d2
      Brad Fitzpatrick authored
      Steve Newman (Google CLA) was missing from the CONTRIBUTORS file,
      presumably because his old commits (made prior to Go being open
      source) in SVN/perforce were imported into hg/git later as
      "devnull@localhost", which probably didn't match anything, and we
      didn't start tracking CLA contributions prior to the Go
      open source release.
      
      As a fun historical note, the initial HTTP client from Steve:
      https://github.com/golang/go/commit/f315fb3
      
      Change-Id: I2b8da4564d99820504788ecc41495a62391078d5
      Reviewed-on: https://go-review.googlesource.com/16864Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      f762d0d2
    • Robert Griesemer's avatar
      cmd/compile/internal/gc: recursive-descent parser · b569b87c
      Robert Griesemer authored
      This is a translation of the yacc-based parser with adjustements
      to make the grammar work for a recursive-descent parser followed
      by cleanups and simplifications.
      
      The yacc actions were mostly literally copied for correctness
      with better temporary names.
      
      A few of the syntax tests were adjusted for slightly different
      error messages (it is very difficult to match the yacc-based
      error messages in all cases, and sometimes the new parser could
      produce better errors).
      
      The new parser is enabled by default.
      To switch back to the yacc-based parser, set -oldparser.
      To hardwire the switch back, uncomment "oldparser = 1" in lex.go.
      
      - passes all.bash
      - ~18% reduced parse time per file on average for make.bash
      - ~3% reduced compile time for building cmd/compile
      
      Change-Id: Icb5651bb9d8b9f66261762d2c94a03793050d4ce
      Reviewed-on: https://go-review.googlesource.com/16665
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      b569b87c
    • Ian Lance Taylor's avatar
      cmd/go: fix build -n when adding to archive with gc toolchain · b5c1b5d7
      Ian Lance Taylor authored
      Fix the output of build -n when adding to an existing archive with the
      gc toolchain by observing that we are, now, always doing that.  When
      using the gc toolchain the archive is now always created by the Go
      compiler, and never by the pack command.
      
      No test because we have not historically tested build -n output.
      
      Fixes #13118.
      
      Change-Id: I3a5c43cf45169fa6c9581e4741309c77d2b6e58b
      Reviewed-on: https://go-review.googlesource.com/16761Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      b5c1b5d7
    • Brad Fitzpatrick's avatar
      A+C: automated updates · 51fed716
      Brad Fitzpatrick authored
      Add Alberto Bertogli (individual CLA)
      Add Alexander Demakin (individual CLA)
      Add Angelo Bulfone (individual CLA)
      Add Anthony Canino (individual CLA)
      Add Arnout Engelen (individual CLA)
      Add Cedric Staub (corporate CLA for Square, Inc.)
      Add Dan Caddigan (individual CLA)
      Add Dan Jacques (corporate CLA for Google Inc.)
      Add Daniel Skinner (individual CLA)
      Add David Howden (individual CLA)
      Add Dmitry Yakunin (individual CLA)
      Add Emmanuel Odeke (individual CLA)
      Add Eric Koleda (corporate CLA for Google Inc.)
      Add Erik Dubbelboer (individual CLA)
      Add Evan Broder (corporate CLA for Stripe, Inc.)
      Add Ford Hurley (individual CLA)
      Add Francisco Claude (individual CLA)
      Add Gaurish Sharma (individual CLA)
      Add Hsin-Ho Yeh (individual CLA)
      Add Ian Gudger (individual CLA)
      Add Ilya Tocar (corporate CLA for Intel Corporation)
      Add John Jenkins (individual CLA)
      Add Kenny Grant (individual CLA)
      Add Kevin Malachowski (corporate CLA for Google Inc.)
      Add Kim Shrier (corporate CLA for RackTop Systems Inc.)
      Add Klaus Post (individual CLA)
      Add Lewin Bormann (individual CLA)
      Add Manu S Ajith (individual CLA)
      Add Matt Drollette (individual CLA)
      Add Meng Zhuo (individual CLA)
      Add Mhd Sulhan (individual CLA)
      Add Mohit Agarwal (individual CLA)
      Add Nathan Otterness (individual CLA)
      Add Nathan VanBenschoten (individual CLA)
      Add Paul Hankin (corporate CLA for Google Inc.)
      Add Paul Meyer (individual CLA)
      Add Pavel Paulau (individual CLA)
      Add Ralph Corderoy (individual CLA)
      Add Rob Norman (individual CLA)
      Add Seth Hoenig (individual CLA)
      Add Spencer Nelson (individual CLA)
      Add Steve Phillips (individual CLA)
      Add Thorben Krueger (individual CLA)
      Add Tormod Erevik Lea (individual CLA)
      Add Will Chan (corporate CLA for Google Inc.)
      Add Yao Zhang (individual CLA)
      Add Yasuharu Goto (individual CLA)
      Add Yuki Yugui Sonoda (corporate CLA for Google Inc.)
      
      Updates #12042
      
      Change-Id: Ia5f8e184fdbe8b135b2c29bb75f20bf72042abae
      Reviewed-on: https://go-review.googlesource.com/16825Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      51fed716
    • David Crawshaw's avatar
      Revert "cmd/internal/obj/arm64, cmd/link: use two instructions rather than three… · 9958a7b5
      David Crawshaw authored
      Revert "cmd/internal/obj/arm64, cmd/link: use two instructions rather than three for loads from memory"
      
      This reverts commit 3a9bc571.
      
      Breaks darwin/arm64.
      
      Change-Id: Ib958beacabca48020a6a47332fbdec99d994060b
      Reviewed-on: https://go-review.googlesource.com/16906Reviewed-by: 's avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      9958a7b5
    • Brad Fitzpatrick's avatar
      net/http: require valid methods in NewRequest and Transport.RoundTrip · a734a855
      Brad Fitzpatrick authored
      Fixes #12078
      
      Change-Id: If09c927fae639ec4ed3894a2b393a87c1e677803
      Reviewed-on: https://go-review.googlesource.com/16829
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      a734a855
    • Brad Fitzpatrick's avatar
      net/http: add method constants · 0b314e1a
      Brad Fitzpatrick authored
      Fixes #12078
      
      Change-Id: Ia8738123b07ca29be4a0cf400ee143729c8b5b3c
      Reviewed-on: https://go-review.googlesource.com/16860Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      0b314e1a
    • Shenghou Ma's avatar
      doc: add mips64/mips64le to supported GOARCHes · d75391af
      Shenghou Ma authored
      Change-Id: If9dc08d6c29bf60b63d75d973033897ad8bf8cc4
      Reviewed-on: https://go-review.googlesource.com/16905Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      d75391af
    • Shenghou Ma's avatar
      api: update next.txt · 07cdebfb
      Shenghou Ma authored
      Change-Id: I4903014f2883d3f52a75a3500dc9e01a5cad8611
      Reviewed-on: https://go-review.googlesource.com/16904
      Run-TryBot: Minux Ma <minux@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      07cdebfb
    • Joe Tsai's avatar
      compress/gzip: specify when Reader.Header is valid · d3a4e8ed
      Joe Tsai authored
      The gzip package is asymmetrical in the way it handles headers.
      In Writer, the Header is written on the first call to Write, Flush, or Close.
      In Reader, the Header is read on calls to NewReader or Reset as opposed to
      after the first Read. Thus, we document this difference.
      
      Fixes #13211
      
      Change-Id: I5f87beff036e5e2fd68a02a15fdb7137e9ca4c37
      Reviewed-on: https://go-review.googlesource.com/16838Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      d3a4e8ed
    • Shenghou Ma's avatar
      cmd/internal/obj/arm64: rewrite branches that are too far · 2a031e6a
      Shenghou Ma authored
      Fixes #12540.
      
      Change-Id: I7893fdc023145b0aca4b4c7df7e08e47edcf5bba
      Reviewed-on: https://go-review.googlesource.com/16902
      Run-TryBot: Minux Ma <minux@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      2a031e6a
    • Matthew Dempsky's avatar
      runtime: move m's OS-specific semaphore fields into mOS · ec9aae77
      Matthew Dempsky authored
      Allows removing fields that aren't relevant to a particular OS or
      changing their types to match the underlying OS system calls they'll
      be used for.
      
      Change-Id: I5cea89ee77b4e7b985bff41337e561887c3272ff
      Reviewed-on: https://go-review.googlesource.com/16176Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      ec9aae77
    • Shenghou Ma's avatar
      cmd/dist: set timeout for go1 benchmark too · d42cc102
      Shenghou Ma authored
      so that GO_TEST_TIMEOUT_SCALE can be applied too.
      It's for the mips64 builder, which is so slow that the
      go1 benchmark can't finish startup within 10 minutes.
      
      Change-Id: I1b824eb0649460101b294fb442da784e872403e7
      Reviewed-on: https://go-review.googlesource.com/16901Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      d42cc102
    • Matt Layher's avatar
      archive/tar: make output deterministic · 3a304989
      Matt Layher authored
      Replaces PID in PaxHeaders with 0.  Sorts PAX header keys before writing
      them to the archive.
      
      Fixes #12358
      
      Change-Id: If239f89c85f1c9d9895a253fb06a47ad44960124
      Reviewed-on: https://go-review.googlesource.com/13975Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      Reviewed-by: 's avatarJoe Tsai <joetsai@digital-static.net>
      3a304989
    • Matthew Dempsky's avatar
      runtime: replace tls0 with m0.tls · 7bb38f6e
      Matthew Dempsky authored
      We're allocating TLS storage for m0 anyway, so might as well use it.
      
      Change-Id: I7dc20bbea5320c8ab8a367f18a9540706751e771
      Reviewed-on: https://go-review.googlesource.com/16890
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      7bb38f6e
    • Yasuhiro Matsumoto's avatar
      net: make TestInterfaceList work on non-English Windows · 940d41e3
      Yasuhiro Matsumoto authored
      Fixes #13198
      
      The output of netsh is encoded with ANSI encoding. So doesn't match with UTF-8 strings.
      Write output as UTF-8 using powershell.
      
      Change-Id: I6c7e93c590ed407f24ae847601d71df9523e028c
      Reviewed-on: https://go-review.googlesource.com/16756
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
      940d41e3
    • Shenghou Ma's avatar
      runtime: disable prefetching on 386 · 0adf6dce
      Shenghou Ma authored
      It doesn't seem to help on modern processors and it makes Go impossible to run
      on Pentium MMX (which is the documented minimum hardware requirement.)
      
      Old is with prefetch, new is w/o. Both are compiled with GO386=sse2.
      Benchmarking is done on Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz.
      
      name                     old time/op    new time/op    delta
      BinaryTree17-4              2.89s ± 2%     2.87s ± 0%    ~     (p=0.061 n=11+10)
      Fannkuch11-4                3.65s ± 0%     3.65s ± 0%    ~     (p=0.365 n=11+11)
      FmtFprintfEmpty-4          52.1ns ± 0%    52.1ns ± 0%    ~      (p=0.065 n=10+9)
      FmtFprintfString-4          168ns ± 0%     167ns ± 0%  -0.48%   (p=0.000 n=8+10)
      FmtFprintfInt-4             167ns ± 0%     167ns ± 1%    ~      (p=0.591 n=9+10)
      FmtFprintfIntInt-4          295ns ± 0%     292ns ± 0%  -0.99%   (p=0.000 n=9+10)
      FmtFprintfPrefixedInt-4     327ns ± 0%     326ns ± 0%  -0.24%  (p=0.007 n=10+10)
      FmtFprintfFloat-4           431ns ± 0%     431ns ± 0%  -0.07%  (p=0.000 n=10+11)
      FmtManyArgs-4              1.13µs ± 0%    1.13µs ± 0%  -0.37%  (p=0.009 n=11+11)
      GobDecode-4                9.36ms ± 1%    9.33ms ± 0%  -0.31%  (p=0.006 n=11+10)
      GobEncode-4                7.38ms ± 1%    7.38ms ± 1%    ~     (p=0.797 n=11+11)
      Gzip-4                      394ms ± 0%     395ms ± 1%    ~     (p=0.519 n=11+11)
      Gunzip-4                   65.4ms ± 0%    65.4ms ± 0%    ~     (p=0.739 n=10+10)
      HTTPClientServer-4         52.4µs ± 1%    52.5µs ± 1%    ~     (p=0.748 n=11+11)
      JSONEncode-4               19.0ms ± 0%    19.0ms ± 0%    ~      (p=0.780 n=9+10)
      JSONDecode-4               59.6ms ± 0%    59.6ms ± 0%    ~      (p=0.720 n=9+10)
      Mandelbrot200-4            4.09ms ± 0%    4.09ms ± 0%    ~      (p=0.295 n=11+9)
      GoParse-4                  3.45ms ± 1%    3.43ms ± 1%  -0.35%  (p=0.040 n=11+11)
      RegexpMatchEasy0_32-4       101ns ± 1%     101ns ± 1%    ~     (p=1.000 n=11+11)
      RegexpMatchEasy0_1K-4       796ns ± 0%     796ns ± 0%    ~      (p=0.954 n=10+8)
      RegexpMatchEasy1_32-4       110ns ± 0%     110ns ± 1%    ~      (p=0.289 n=9+11)
      RegexpMatchEasy1_1K-4       991ns ± 0%     991ns ± 0%    ~      (p=0.784 n=10+8)
      RegexpMatchMedium_32-4      131ns ± 0%     130ns ± 0%  -0.42%   (p=0.004 n=11+9)
      RegexpMatchMedium_1K-4     41.9µs ± 1%    41.6µs ± 0%    ~      (p=0.067 n=11+9)
      RegexpMatchHard_32-4       2.34µs ± 0%    2.34µs ± 0%    ~     (p=0.208 n=11+11)
      RegexpMatchHard_1K-4       70.9µs ± 0%    71.0µs ± 0%    ~      (p=0.968 n=9+10)
      Revcomp-4                   819ms ± 0%     818ms ± 0%    ~     (p=0.251 n=10+11)
      Template-4                 73.9ms ± 0%    73.8ms ± 0%  -0.25%  (p=0.013 n=10+11)
      TimeParse-4                 414ns ± 0%     414ns ± 0%    ~     (p=0.809 n=11+10)
      TimeFormat-4                485ns ± 0%     485ns ± 0%    ~      (p=0.404 n=11+7)
      
      name                     old speed      new speed      delta
      GobDecode-4              82.0MB/s ± 1%  82.3MB/s ± 0%  +0.31%  (p=0.007 n=11+10)
      GobEncode-4               104MB/s ± 1%   104MB/s ± 1%    ~     (p=0.797 n=11+11)
      Gzip-4                   49.2MB/s ± 0%  49.1MB/s ± 1%    ~     (p=0.507 n=11+11)
      Gunzip-4                  297MB/s ± 0%   297MB/s ± 0%    ~     (p=0.670 n=10+10)
      JSONEncode-4              102MB/s ± 0%   102MB/s ± 0%    ~      (p=0.794 n=9+10)
      JSONDecode-4             32.6MB/s ± 0%  32.6MB/s ± 0%    ~       (p=0.334 n=9+9)
      GoParse-4                16.8MB/s ± 1%  16.9MB/s ± 1%    ~     (p=0.052 n=11+11)
      RegexpMatchEasy0_32-4     314MB/s ± 0%   314MB/s ± 1%    ~     (p=0.618 n=11+11)
      RegexpMatchEasy0_1K-4    1.29GB/s ± 0%  1.29GB/s ± 0%    ~     (p=0.315 n=10+10)
      RegexpMatchEasy1_32-4     290MB/s ± 1%   290MB/s ± 1%    ~     (p=0.667 n=10+11)
      RegexpMatchEasy1_1K-4    1.03GB/s ± 0%  1.03GB/s ± 0%    ~      (p=0.829 n=10+8)
      RegexpMatchMedium_32-4   7.63MB/s ± 0%  7.65MB/s ± 0%    ~     (p=0.142 n=11+11)
      RegexpMatchMedium_1K-4   24.4MB/s ± 1%  24.6MB/s ± 0%    ~      (p=0.063 n=11+9)
      RegexpMatchHard_32-4     13.7MB/s ± 0%  13.7MB/s ± 0%    ~     (p=0.302 n=11+11)
      RegexpMatchHard_1K-4     14.4MB/s ± 0%  14.4MB/s ± 0%    ~      (p=0.784 n=9+10)
      Revcomp-4                 310MB/s ± 0%   311MB/s ± 0%    ~     (p=0.243 n=10+11)
      Template-4               26.2MB/s ± 0%  26.3MB/s ± 0%  +0.24%  (p=0.009 n=10+11)
      
      Update #12970.
      
      Change-Id: Id185080687a60c229a5cb2e5220e7ca1b53910e2
      Reviewed-on: https://go-review.googlesource.com/15999Reviewed-by: 's avatarAustin Clements <austin@google.com>
      Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
      0adf6dce
    • Shenghou Ma's avatar
      os: add document for ErrInvalid · 85ca578d
      Shenghou Ma authored
      Fixes #12391.
      
      Change-Id: I31211cd711c035151785c3083571594d15c7d93e
      Reviewed-on: https://go-review.googlesource.com/16873Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      85ca578d