1. 29 Mar, 2017 4 commits
    • Rick Hudson's avatar
      runtime: redo insert/remove of large spans · 6e9ec141
      Rick Hudson authored
      Currently for spans with up to 1 MBytes (128 pages) we
      maintain an array indexed by the number of pages in the
      span. This is efficient both in terms of space as well
      as time to insert or remove a span of a particular size.
      
      Unfortunately for spans larger than 1 MByte we currently
      place them on a separate linked list. This results in
      O(n) behavior. Now that we are seeing heaps approaching
      100 GBytes n is large enough to be noticed in real programs.
      
      This change replaces the linked list now used with a balanced
      binary tree structure called a treap. A treap is a
      probabilistically balanced tree offering O(logN) behavior for
      inserting and removing spans.
      
      To verify that this approach will work we start with noting
      that only spans with sizes > 1MByte will be put into the treap.
      This means that to support 1 TByte a treap will need at most
      1 million nodes and can ideally be held in a treap with a
      depth of 20. Experiments with adding and removing randomly
      sized spans from the treap seem to result in treaps with
      depths of about twice the ideal or 40. A petabyte would
      require a tree of only twice again that depth again so this
      algorithm should last well into the future.
      
      Fixes #19393
      
      Go1 benchmarks indicate this is basically an overall wash.
      Tue Mar 28 21:29:21 EDT 2017
      name                     old time/op    new time/op    delta
      BinaryTree17-4              2.42s ± 1%     2.42s ± 1%    ~     (p=0.980 n=21+21)
      Fannkuch11-4                3.00s ± 1%     3.18s ± 4%  +6.10%  (p=0.000 n=22+24)
      FmtFprintfEmpty-4          40.5ns ± 1%    40.3ns ± 3%    ~     (p=0.692 n=22+25)
      FmtFprintfString-4         65.9ns ± 3%    64.6ns ± 1%  -1.98%  (p=0.000 n=24+23)
      FmtFprintfInt-4            69.6ns ± 1%    68.0ns ± 7%  -2.30%  (p=0.001 n=21+22)
      FmtFprintfIntInt-4          102ns ± 2%      99ns ± 1%  -3.07%  (p=0.000 n=23+23)
      FmtFprintfPrefixedInt-4     126ns ± 0%     125ns ± 0%  -0.79%  (p=0.000 n=19+17)
      FmtFprintfFloat-4           206ns ± 2%     205ns ± 1%    ~     (p=0.671 n=23+21)
      FmtManyArgs-4               441ns ± 1%     445ns ± 1%  +0.88%  (p=0.000 n=22+23)
      GobDecode-4                5.73ms ± 1%    5.86ms ± 1%  +2.37%  (p=0.000 n=23+22)
      GobEncode-4                4.51ms ± 1%    4.89ms ± 1%  +8.32%  (p=0.000 n=22+22)
      Gzip-4                      197ms ± 0%     202ms ± 1%  +2.75%  (p=0.000 n=23+24)
      Gunzip-4                   32.9ms ± 8%    32.7ms ± 2%    ~     (p=0.466 n=23+24)
      HTTPClientServer-4         57.3µs ± 1%    56.7µs ± 1%  -0.94%  (p=0.000 n=21+22)
      JSONEncode-4               13.8ms ± 1%    13.9ms ± 2%  +1.14%  (p=0.000 n=22+23)
      JSONDecode-4               47.4ms ± 1%    48.1ms ± 1%  +1.49%  (p=0.000 n=23+23)
      Mandelbrot200-4            3.92ms ± 0%    3.92ms ± 1%  +0.21%  (p=0.000 n=22+22)
      GoParse-4                  2.89ms ± 1%    2.87ms ± 1%  -0.68%  (p=0.000 n=21+22)
      RegexpMatchEasy0_32-4      73.6ns ± 1%    72.0ns ± 2%  -2.15%  (p=0.000 n=21+22)
      RegexpMatchEasy0_1K-4       173ns ± 1%     173ns ± 1%    ~     (p=0.847 n=22+24)
      RegexpMatchEasy1_32-4      71.9ns ± 1%    69.8ns ± 1%  -2.99%  (p=0.000 n=23+20)
      RegexpMatchEasy1_1K-4       314ns ± 1%     308ns ± 1%  -1.91%  (p=0.000 n=22+23)
      RegexpMatchMedium_32-4      106ns ± 0%     105ns ± 1%  -0.58%  (p=0.000 n=19+21)
      RegexpMatchMedium_1K-4     34.3µs ± 1%    34.3µs ± 1%    ~     (p=0.871 n=23+22)
      RegexpMatchHard_32-4       1.67µs ± 1%    1.67µs ± 7%    ~     (p=0.224 n=22+23)
      RegexpMatchHard_1K-4       51.5µs ± 1%    50.4µs ± 1%  -1.99%  (p=0.000 n=22+23)
      Revcomp-4                   383ms ± 1%     415ms ± 0%  +8.51%  (p=0.000 n=22+22)
      Template-4                 51.5ms ± 1%    51.5ms ± 1%    ~     (p=0.555 n=20+23)
      TimeParse-4                 279ns ± 2%     277ns ± 1%  -0.95%  (p=0.000 n=24+22)
      TimeFormat-4                294ns ± 1%     296ns ± 1%  +0.58%  (p=0.003 n=24+23)
      [Geo mean]                 43.7µs         43.8µs       +0.32%
      
      name                     old speed      new speed      delta
      GobDecode-4               134MB/s ± 1%   131MB/s ± 1%  -2.32%  (p=0.000 n=23+22)
      GobEncode-4               170MB/s ± 1%   157MB/s ± 1%  -7.68%  (p=0.000 n=22+22)
      Gzip-4                   98.7MB/s ± 0%  96.1MB/s ± 1%  -2.68%  (p=0.000 n=23+24)
      Gunzip-4                  590MB/s ± 7%   593MB/s ± 2%    ~     (p=0.466 n=23+24)
      JSONEncode-4              141MB/s ± 1%   139MB/s ± 2%  -1.13%  (p=0.000 n=22+23)
      JSONDecode-4             40.9MB/s ± 1%  40.3MB/s ± 0%  -1.47%  (p=0.000 n=23+23)
      GoParse-4                20.1MB/s ± 1%  20.2MB/s ± 1%  +0.69%  (p=0.000 n=21+22)
      RegexpMatchEasy0_32-4     435MB/s ± 1%   444MB/s ± 2%  +2.21%  (p=0.000 n=21+22)
      RegexpMatchEasy0_1K-4    5.89GB/s ± 1%  5.89GB/s ± 1%    ~     (p=0.439 n=22+24)
      RegexpMatchEasy1_32-4     445MB/s ± 1%   459MB/s ± 1%  +3.06%  (p=0.000 n=23+20)
      RegexpMatchEasy1_1K-4    3.26GB/s ± 1%  3.32GB/s ± 1%  +1.97%  (p=0.000 n=22+23)
      RegexpMatchMedium_32-4   9.40MB/s ± 1%  9.44MB/s ± 1%  +0.43%  (p=0.000 n=23+21)
      RegexpMatchMedium_1K-4   29.8MB/s ± 1%  29.8MB/s ± 1%    ~     (p=0.826 n=23+22)
      RegexpMatchHard_32-4     19.1MB/s ± 1%  19.1MB/s ± 7%    ~     (p=0.233 n=22+23)
      RegexpMatchHard_1K-4     19.9MB/s ± 1%  20.3MB/s ± 1%  +2.03%  (p=0.000 n=22+23)
      Revcomp-4                 664MB/s ± 1%   612MB/s ± 0%  -7.85%  (p=0.000 n=22+22)
      Template-4               37.6MB/s ± 1%  37.7MB/s ± 1%    ~     (p=0.558 n=20+23)
      [Geo mean]                134MB/s        133MB/s       -0.76%
      Tue Mar 28 22:16:54 EDT 2017
      
      Change-Id: I4a4f5c2b53d3fb85ef76c98522d3ed5cf8ae5b7e
      Reviewed-on: https://go-review.googlesource.com/38732Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      6e9ec141
    • haya14busa's avatar
      cmd/go: add -json flag to go env · 846f9254
      haya14busa authored
      "go env" prints Go environment information as a shell script format by
      default but it's difficult for some tools (e.g. editor packages) to
      interpret it.
      
      The -json flag prints the environment in JSON format which
      can be easily interpreted by a lot of tools.
      
      $ go env -json
      {
              "CC": "gcc",
              "CGO_CFLAGS": "-g -O2",
              "CGO_CPPFLAGS": "",
              "CGO_CXXFLAGS": "-g -O2",
              "CGO_ENABLED": "1",
              "CGO_FFLAGS": "-g -O2",
              "CGO_LDFLAGS": "-g -O2",
              "CXX": "g++",
              "GCCGO": "gccgo",
              "GOARCH": "amd64",
              "GOBIN": "/home/haya14busa/go/bin",
              "GOEXE": "",
              "GOGCCFLAGS": "-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build498013955=/tmp/go-build -gno-record-gcc-switches",
              "GOHOSTARCH": "amd64",
              "GOHOSTOS": "linux",
              "GOOS": "linux",
              "GOPATH": "/home/haya14busa",
              "GORACE": "",
              "GOROOT": "/home/haya14busa/src/go.googlesource.com/go",
              "GOTOOLDIR": "/home/haya14busa/src/go.googlesource.com/go/pkg/tool/linux_amd64",
              "PKG_CONFIG": "pkg-config"
      }
      
      Also, it supports arguments with -json flag.
      
      $ go env -json GOROOT GOPATH GOBIN
      {
              "GOBIN": "/home/haya14busa/go/bin",
              "GOPATH": "/home/haya14busa",
              "GOROOT": "/home/haya14busa/src/go.googlesource.com/go"
      }
      
      Fixes #12567
      
      Change-Id: I75db3780f14a8ab8c7fa58cc3c9cc488ef7b66a1
      Reviewed-on: https://go-review.googlesource.com/38757Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      846f9254
    • Dave Cheney's avatar
      cmd/compile/internal/gc: remove unused state.placeholder field · 9f232c17
      Dave Cheney authored
      gc.state.placeholder was added in 5a6e511c but never used.
      
      Change-Id: I5a621507279d5bb1f3991b7a412d9a63039c464e
      Reviewed-on: https://go-review.googlesource.com/38755Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      9f232c17
    • Dave Cheney's avatar
      cmd/internal/obj/x86: clean up byteswapreg · 54af1870
      Dave Cheney authored
      Make byteswapreg more Go like.
      
      Change-Id: Ibdf3603cae9cad2b3465b4c224a28a4c4c745c2e
      Reviewed-on: https://go-review.googlesource.com/38615
      Run-TryBot: Dave Cheney <dave@cheney.net>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      54af1870
  2. 28 Mar, 2017 11 commits
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: cleanup selecttype · b72636cb
      Matthew Dempsky authored
      Use namedfield consistently.
      
      Passes toolstash-check.
      
      Change-Id: Ic5a3acb4bfaa1f60dd2eac94612160509e8d7f94
      Reviewed-on: https://go-review.googlesource.com/38741
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b72636cb
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: use anonfield and namedfield · 3c0072e0
      Matthew Dempsky authored
      Automated refactoring using gofmt.
      
      Passes toolstash-check.
      
      Change-Id: I8624e1c231dc736e1bb4cc800acaf629a0af91d7
      Reviewed-on: https://go-review.googlesource.com/38740
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3c0072e0
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: npos(p, nod(o, l, r)) -> nodl(p, o, l, r) · 3f4f119b
      Matthew Dempsky authored
      Prepared with gofmt -r.
      
      Passes toolstash-check.
      
      Change-Id: I8a4f7a8c365dfe464dfc5868a18c67d56af37749
      Reviewed-on: https://go-review.googlesource.com/38739
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3f4f119b
    • Ian Lance Taylor's avatar
      test: add test for gccgo compiler crash · 835b17c8
      Ian Lance Taylor authored
      Gccgo crashed compiling a function that returned multiple zero-sized values.
      
      Change-Id: I499112cc310e4a4f649962f4d2bc9fee95dee1b6
      Reviewed-on: https://go-review.googlesource.com/38772Reviewed-by: default avatarThan McIntosh <thanm@google.com>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      835b17c8
    • Ilya Tocar's avatar
      test/fixedbugs: add a test for 19201 · 4b50c813
      Ilya Tocar authored
      This was cherry-picked to 1.8 as CL 38587, but on master issue was fixed
      by CL 37661. Add still relevant part (test) and close issue, since test passes.
      
      Fixes #19201
      
      Change-Id: I6415792e2c465dc6d9bd6583ba1e54b107bcf5cc
      Reviewed-on: https://go-review.googlesource.com/37376
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      4b50c813
    • Josh Bleecher Snyder's avatar
      cmd/compile: fix two instances of { lineno = ...; yyerror } · 95bfd927
      Josh Bleecher Snyder authored
      Updates #19683
      
      Change-Id: Ic00d5a9807200791cf37553f4f802dbf27beea19
      Reviewed-on: https://go-review.googlesource.com/38770
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      95bfd927
    • Josh Bleecher Snyder's avatar
      cmd/compile: number autotmps per-func, not per-package · b87fcc6e
      Josh Bleecher Snyder authored
      Prior to this CL, autotmps were global to a package.
      They also shared numbering with static variables.
      Switch autotmp numbering to be per-function instead,
      and do implicit numbering based on len(Func.Dcl).
      This eliminates a dependency on a global variable
      from the backend without adding to the Func struct.
      While we're here, move statuniqgen closer to its
      sole remaining user.
      
      This actually improves compiler performance,
      because the autotmp_* names can now be
      reused across functions.
      
      name       old alloc/op    new alloc/op    delta
      Template      40.6MB ± 0%     40.1MB ± 0%  -1.38%  (p=0.000 n=10+10)
      Unicode       29.9MB ± 0%     29.9MB ± 0%    ~     (p=0.912 n=10+10)
      GoTypes        116MB ± 0%      114MB ± 0%  -1.53%  (p=0.000 n=10+10)
      SSA            865MB ± 0%      856MB ± 0%  -1.04%  (p=0.000 n=10+10)
      Flate         25.8MB ± 0%     25.4MB ± 0%  -1.36%  (p=0.000 n=10+10)
      GoParser      32.2MB ± 0%     32.0MB ± 0%  -0.72%  (p=0.000 n=10+10)
      Reflect       80.3MB ± 0%     79.0MB ± 0%  -1.65%  (p=0.000 n=9+10)
      Tar           27.0MB ± 0%     26.7MB ± 0%  -0.86%  (p=0.000 n=10+9)
      XML           42.8MB ± 0%     42.4MB ± 0%  -0.95%  (p=0.000 n=10+10)
      
      name       old allocs/op   new allocs/op   delta
      Template        398k ± 1%       396k ± 1%  -0.59%  (p=0.002 n=10+10)
      Unicode         321k ± 1%       321k ± 0%    ~     (p=0.912 n=10+10)
      GoTypes        1.17M ± 0%      1.16M ± 0%  -0.77%  (p=0.000 n=10+10)
      SSA            7.65M ± 0%      7.62M ± 0%  -0.40%  (p=0.000 n=10+10)
      Flate           240k ± 1%       238k ± 1%  -0.56%  (p=0.001 n=10+10)
      GoParser        323k ± 1%       320k ± 1%  -0.65%  (p=0.002 n=10+10)
      Reflect        1.01M ± 0%      1.00M ± 0%  -0.37%  (p=0.001 n=9+10)
      Tar             256k ± 1%       255k ± 0%    ~     (p=0.101 n=10+8)
      XML             400k ± 1%       398k ± 1%    ~     (p=0.063 n=10+10)
      
      
      Change-Id: I3c23ca98129137d373106990b1a3e1507bbe0cc3
      Reviewed-on: https://go-review.googlesource.com/38729
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      b87fcc6e
    • Josh Bleecher Snyder's avatar
      cmd/compile: strengthen SetFields/Width safety guarantee · 8ee2d5bc
      Josh Bleecher Snyder authored
      It is currently possible in the compiler to create a struct type,
      calculate the widths of types that depend on it,
      and then alter the struct type.
      
      transformclosure has local protection against this.
      Protect against it at a deeper level.
      
      This is preparation to call dowidth automatically,
      rather than explicitly.
      
      This is a re-roll of CL 38469.
      
      Change-Id: Ic5b4baa250618504611fc57cbf51ab01d1eddf80
      Reviewed-on: https://go-review.googlesource.com/38534
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8ee2d5bc
    • Josh Bleecher Snyder's avatar
      cmd/compile: add Type.WidthCalculated · 8dafdb1b
      Josh Bleecher Snyder authored
      Prior to this CL, Type.Width != 0 was the mark
      of a Type whose Width had been calculated.
      As a result, dowidth always recalculated
      the width of struct{}.
      This, combined with the prohibition on calculating
      the width of a FuncArgsStruct and the use of
      struct{} as a function argument,
      meant that there were circumstances in which
      it was forbidden to call dowidth on a type.
      This inhibits refactoring to call dowidth automatically,
      rather than explicitly.
      Instead add a helper method, Type.WidthCalculated,
      and implement as Type.Align > 0.
      Type.Width is not a good candidate for tracking
      whether the width has been calculated;
      0 is a value type width, and Width is subject to
      too much magic value game-playing.
      
      For good measure, add a test for #11354.
      
      Change-Id: Ie9a9fb5d924e7a2010c1904ae5e38ed4a38eaeb2
      Reviewed-on: https://go-review.googlesource.com/38468
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      8dafdb1b
    • haya14busa's avatar
      regexp: reduce allocations at onePassCopy · f5c1926e
      haya14busa authored
      It reduces needless allocations on compiling onepass regex.
      
      name                                      old time/op    new time/op    delta
      CompileOnepass/^(?:(?:(?:.(?:$))?))...-4    6.31µs ± 3%    6.11µs ± 3%     ~     (p=0.056 n=5+5)
      CompileOnepass/^abcd$-4                     5.69µs ±12%    4.93µs ± 4%  -13.42%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a{0,})*?)$-4          7.10µs ±12%    5.82µs ± 5%  -17.95%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a+)*)$-4              5.99µs ±10%    6.07µs ±11%     ~     (p=1.000 n=5+5)
      CompileOnepass/^(?:(?:a|(?:aa)))$-4         7.36µs ± 4%    7.81µs ±19%     ~     (p=0.310 n=5+5)
      CompileOnepass/^(?:[^\s\S])$-4              4.71µs ± 3%    4.71µs ± 5%     ~     (p=1.000 n=5+5)
      CompileOnepass/^(?:(?:(?:a*)+))$-4          6.06µs ± 2%    6.23µs ± 9%     ~     (p=0.310 n=5+5)
      CompileOnepass/^[a-c]+$-4                   4.74µs ± 4%    4.64µs ± 6%     ~     (p=0.421 n=5+5)
      CompileOnepass/^[a-c]*$-4                   5.17µs ± 2%    4.68µs ± 0%   -9.57%  (p=0.016 n=5+4)
      CompileOnepass/^(?:a*)$-4                   5.34µs ± 3%    5.08µs ±12%     ~     (p=0.151 n=5+5)
      CompileOnepass/^(?:(?:aa)|a)$-4             7.24µs ± 5%    7.33µs ±12%     ~     (p=0.841 n=5+5)
      CompileOnepass/^...$-4                      5.28µs ± 3%    4.99µs ± 9%     ~     (p=0.095 n=5+5)
      CompileOnepass/^(?:a|(?:aa))$-4             7.20µs ± 4%    7.24µs ±10%     ~     (p=0.841 n=5+5)
      CompileOnepass/^a((b))c$-4                  7.99µs ± 3%    7.76µs ± 8%     ~     (p=0.151 n=5+5)
      CompileOnepass/^a.[l-nA-Cg-j]?e$-4          8.30µs ± 5%    7.29µs ± 4%  -12.08%  (p=0.008 n=5+5)
      CompileOnepass/^a((b))$-4                   7.34µs ± 4%    7.24µs ±19%     ~     (p=0.690 n=5+5)
      CompileOnepass/^a(?:(b)|(c))c$-4            9.80µs ± 6%    9.49µs ±18%     ~     (p=0.151 n=5+5)
      CompileOnepass/^a(?:b|c)$-4                 5.23µs ± 3%    4.80µs ±10%     ~     (p=0.056 n=5+5)
      CompileOnepass/^a(?:b?|c)$-4                8.26µs ± 3%    7.30µs ± 3%  -11.62%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b?|c+)$-4               9.18µs ± 2%    8.16µs ± 2%  -11.06%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:bc)+$-4                 6.16µs ± 3%    6.41µs ±13%     ~     (p=0.548 n=5+5)
      CompileOnepass/^a(?:[bcd])+$-4              5.75µs ± 5%    5.50µs ±12%     ~     (p=0.151 n=5+5)
      CompileOnepass/^a((?:[bcd])+)$-4            7.65µs ± 5%    6.93µs ± 9%     ~     (p=0.056 n=5+5)
      CompileOnepass/^a(:?b|c)*d$-4               13.0µs ± 1%    12.1µs ± 2%   -6.91%  (p=0.008 n=5+5)
      CompileOnepass/^.bc(d|e)*$-4                9.20µs ± 4%    8.25µs ± 3%  -10.38%  (p=0.008 n=5+5)
      CompileOnepass/^loooooooooooooooooo...-4     254µs ± 2%     220µs ± 6%  -13.47%  (p=0.008 n=5+5)
      
      name                                      old alloc/op   new alloc/op   delta
      CompileOnepass/^(?:(?:(?:.(?:$))?))...-4    3.92kB ± 0%    3.41kB ± 0%  -13.06%  (p=0.008 n=5+5)
      CompileOnepass/^abcd$-4                     3.20kB ± 0%    2.75kB ± 0%  -14.00%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a{0,})*?)$-4          3.85kB ± 0%    3.34kB ± 0%  -13.31%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a+)*)$-4              3.46kB ± 0%    2.95kB ± 0%  -14.78%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a|(?:aa)))$-4         4.20kB ± 0%    3.75kB ± 0%  -10.67%  (p=0.008 n=5+5)
      CompileOnepass/^(?:[^\s\S])$-4              3.10kB ± 0%    2.46kB ± 0%  -20.62%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:(?:a*)+))$-4          3.64kB ± 0%    3.13kB ± 0%  -14.07%  (p=0.008 n=5+5)
      CompileOnepass/^[a-c]+$-4                   3.06kB ± 0%    2.48kB ± 0%  -18.85%  (p=0.008 n=5+5)
      CompileOnepass/^[a-c]*$-4                   3.10kB ± 0%    2.52kB ± 0%  -18.60%  (p=0.008 n=5+5)
      CompileOnepass/^(?:a*)$-4                   3.21kB ± 0%    2.63kB ± 0%  -17.96%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:aa)|a)$-4             4.09kB ± 0%    3.64kB ± 0%  -10.96%  (p=0.008 n=5+5)
      CompileOnepass/^...$-4                      3.42kB ± 0%    2.91kB ± 0%  -14.95%  (p=0.008 n=5+5)
      CompileOnepass/^(?:a|(?:aa))$-4             4.09kB ± 0%    3.64kB ± 0%  -10.96%  (p=0.008 n=5+5)
      CompileOnepass/^a((b))c$-4                  5.67kB ± 0%    4.39kB ± 0%  -22.59%  (p=0.008 n=5+5)
      CompileOnepass/^a.[l-nA-Cg-j]?e$-4          5.73kB ± 0%    4.32kB ± 0%  -24.58%  (p=0.008 n=5+5)
      CompileOnepass/^a((b))$-4                   5.41kB ± 0%    4.06kB ± 0%  -24.85%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:(b)|(c))c$-4            6.40kB ± 0%    5.31kB ± 0%  -17.00%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b|c)$-4                 3.46kB ± 0%    2.88kB ± 0%  -16.67%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b?|c)$-4                5.77kB ± 0%    4.36kB ± 0%  -24.41%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b?|c+)$-4               5.94kB ± 0%    4.59kB ± 0%  -22.64%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:bc)+$-4                 3.60kB ± 0%    3.15kB ± 0%  -12.44%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:[bcd])+$-4              3.46kB ± 0%    2.94kB ± 0%  -14.81%  (p=0.008 n=5+5)
      CompileOnepass/^a((?:[bcd])+)$-4            5.50kB ± 0%    4.09kB ± 0%  -25.62%  (p=0.008 n=5+5)
      CompileOnepass/^a(:?b|c)*d$-4               7.24kB ± 0%    6.15kB ± 0%  -15.03%  (p=0.008 n=5+5)
      CompileOnepass/^.bc(d|e)*$-4                5.75kB ± 0%    4.47kB ± 0%  -22.25%  (p=0.008 n=5+5)
      CompileOnepass/^loooooooooooooooooo...-4     225kB ± 0%     135kB ± 0%  -39.99%  (p=0.008 n=5+5)
      
      name                                      old allocs/op  new allocs/op  delta
      CompileOnepass/^(?:(?:(?:.(?:$))?))...-4      52.0 ± 0%      49.0 ± 0%   -5.77%  (p=0.008 n=5+5)
      CompileOnepass/^abcd$-4                       44.0 ± 0%      41.0 ± 0%   -6.82%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a{0,})*?)$-4            52.0 ± 0%      49.0 ± 0%   -5.77%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a+)*)$-4                47.0 ± 0%      44.0 ± 0%   -6.38%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:a|(?:aa)))$-4           57.0 ± 0%      54.0 ± 0%   -5.26%  (p=0.008 n=5+5)
      CompileOnepass/^(?:[^\s\S])$-4                36.0 ± 0%      33.0 ± 0%   -8.33%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:(?:a*)+))$-4            49.0 ± 0%      46.0 ± 0%   -6.12%  (p=0.008 n=5+5)
      CompileOnepass/^[a-c]+$-4                     39.0 ± 0%      36.0 ± 0%   -7.69%  (p=0.008 n=5+5)
      CompileOnepass/^[a-c]*$-4                     44.0 ± 0%      41.0 ± 0%   -6.82%  (p=0.008 n=5+5)
      CompileOnepass/^(?:a*)$-4                     45.0 ± 0%      42.0 ± 0%   -6.67%  (p=0.008 n=5+5)
      CompileOnepass/^(?:(?:aa)|a)$-4               56.0 ± 0%      53.0 ± 0%   -5.36%  (p=0.008 n=5+5)
      CompileOnepass/^...$-4                        46.0 ± 0%      43.0 ± 0%   -6.52%  (p=0.008 n=5+5)
      CompileOnepass/^(?:a|(?:aa))$-4               56.0 ± 0%      53.0 ± 0%   -5.36%  (p=0.008 n=5+5)
      CompileOnepass/^a((b))c$-4                    57.0 ± 0%      53.0 ± 0%   -7.02%  (p=0.008 n=5+5)
      CompileOnepass/^a.[l-nA-Cg-j]?e$-4            62.0 ± 0%      58.0 ± 0%   -6.45%  (p=0.008 n=5+5)
      CompileOnepass/^a((b))$-4                     51.0 ± 0%      47.0 ± 0%   -7.84%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:(b)|(c))c$-4              69.0 ± 0%      65.0 ± 0%   -5.80%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b|c)$-4                   43.0 ± 0%      40.0 ± 0%   -6.98%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b?|c)$-4                  61.0 ± 0%      57.0 ± 0%   -6.56%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:b?|c+)$-4                 67.0 ± 0%      63.0 ± 0%   -5.97%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:bc)+$-4                   49.0 ± 0%      46.0 ± 0%   -6.12%  (p=0.008 n=5+5)
      CompileOnepass/^a(?:[bcd])+$-4                46.0 ± 0%      43.0 ± 0%   -6.52%  (p=0.008 n=5+5)
      CompileOnepass/^a((?:[bcd])+)$-4              53.0 ± 0%      49.0 ± 0%   -7.55%  (p=0.008 n=5+5)
      CompileOnepass/^a(:?b|c)*d$-4                  109 ± 0%       105 ± 0%   -3.67%  (p=0.008 n=5+5)
      CompileOnepass/^.bc(d|e)*$-4                  66.0 ± 0%      62.0 ± 0%   -6.06%  (p=0.008 n=5+5)
      CompileOnepass/^loooooooooooooooooo...-4     1.10k ± 0%     1.09k ± 0%   -0.91%  (p=0.008 n=5+5)
      
      Fixes #19735
      
      Change-Id: Ic68503aaa08e42fafcf7e11cf1f584d674f5ea7b
      Reviewed-on: https://go-review.googlesource.com/38750Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f5c1926e
    • Josh Bleecher Snyder's avatar
      cmd/internal/obj: eliminate stray ctxt.Cursym write · aca58647
      Josh Bleecher Snyder authored
      It is explicitly assigned in each of the
      assemblers as needed.
      I plan to remove Cursym entirely eventually,
      but this is a helpful intermediate step.
      
      Passes toolstash-check -all.
      
      Updates #15756
      
      Change-Id: Id7ddefae2def439af44d03053886ca8cc935731f
      Reviewed-on: https://go-review.googlesource.com/38727
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      aca58647
  3. 27 Mar, 2017 11 commits
  4. 26 Mar, 2017 7 commits
  5. 25 Mar, 2017 7 commits