1. 13 Apr, 2016 7 commits
    • Matthew Dempsky's avatar
      runtime: simplify setPanicOnFault slightly · 6af4e996
      Matthew Dempsky authored
      No need to acquire the M just to change G's paniconfault flag, and the
      original C implementation of SetPanicOnFault did not. The M
      acquisition logic is an artifact of golang.org/cl/131010044, which was
      started before golang.org/cl/123640043 (which introduced the current
      "getg" function) was submitted.
      
      Change-Id: I6d1939008660210be46904395cf5f5bbc2c8f754
      Reviewed-on: https://go-review.googlesource.com/21935
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6af4e996
    • Brad Fitzpatrick's avatar
      all: use new io.SeekFoo constants instead of os.SEEK_FOO · 381e5eee
      Brad Fitzpatrick authored
      Automated change.
      
      Fixes #15269
      
      Change-Id: I8deb2ac0101d3f7c390467ceb0a1561b72edbb2f
      Reviewed-on: https://go-review.googlesource.com/21962
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      381e5eee
    • Martin Möhrmann's avatar
      strings: improve explode and correct comment · 819e0b29
      Martin Möhrmann authored
      Merges explodetests into splittests which already contain
      some of the tests that cover explode.
      
      Adds a test to cover the utf8.RuneError branch in explode.
      
      name      old time/op  new time/op  delta
      Split1-2  14.9ms ± 0%  14.2ms ± 0%  -4.06%  (p=0.000 n=47+49)
      
      Change-Id: I00f796bd2edab70e926ea9e65439d820c6a28254
      Reviewed-on: https://go-review.googlesource.com/21609
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      819e0b29
    • Emmanuel Odeke's avatar
      html/template: add examples of loading templates from files · 3f66d8c8
      Emmanuel Odeke authored
      Adds examples showing loading templates from files and
      executing them.
      
      Shows examples:
      - Using ParseGlob.
      - Using ParseFiles.
      - Using helper functions to share and use templates
      in different contexts by adding them to an existing
      bundle of templates.
      - Using a group of driver templates with distinct sets
      of helper templates.
      
      Almost all of the code was directly copied from text/template.
      
      Fixes #8500
      
      Change-Id: Ic3d91d5232afc5a1cd2d8cd3d9a5f3b754c64225
      Reviewed-on: https://go-review.googlesource.com/21854Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      3f66d8c8
    • Josh Bleecher Snyder's avatar
      cmd/compile: teach CSE that new objects are bespoke · db5338f8
      Josh Bleecher Snyder authored
      runtime.newobject never returns the same thing twice,
      so the resulting value will never be a common subexpression.
      
      This helps when compiling large static data structures
      that include pointers, such as maps and slices.
      No clear performance impact on other code. (See below.)
      
      For the code in issue #15112:
      
      Before:
        real	1m14.238s
        user	1m18.985s
        sys	0m0.787s
      
      After:
        real	0m47.172s
        user	0m52.248s
        sys	0m0.767s
      
      For the code in issue #15235, size 10k:
      
      Before:
        real	0m44.916s
        user	0m46.577s
        sys	0m0.304s
      
      After:
        real	0m7.703s
        user	0m9.041s
        sys	0m0.316s
      
      Still more work to be done, particularly for #15112.
      
      Updates #15112
      Updates #15235
      
      
      name       old time/op      new time/op      delta
      Template        330ms ±11%       333ms ±13%    ~           (p=0.749 n=20+19)
      Unicode         148ms ± 6%       152ms ± 8%    ~           (p=0.072 n=18+20)
      GoTypes         1.01s ± 7%       1.01s ± 3%    ~           (p=0.583 n=20+20)
      Compiler        5.04s ± 2%       5.06s ± 2%    ~           (p=0.314 n=20+20)
      
      name       old user-ns/op   new user-ns/op   delta
      Template   444user-ms ±11%  445user-ms ±10%    ~           (p=0.738 n=20+20)
      Unicode    215user-ms ± 5%  218user-ms ± 5%    ~           (p=0.239 n=18+18)
      GoTypes    1.45user-s ± 3%  1.45user-s ± 4%    ~           (p=0.620 n=20+20)
      Compiler   7.23user-s ± 2%  7.22user-s ± 2%    ~           (p=0.901 n=20+19)
      
      name       old alloc/op     new alloc/op     delta
      Template       55.0MB ± 0%      55.0MB ± 0%    ~           (p=0.547 n=20+20)
      Unicode        37.6MB ± 0%      37.6MB ± 0%    ~           (p=0.301 n=20+20)
      GoTypes         177MB ± 0%       177MB ± 0%    ~           (p=0.065 n=20+19)
      Compiler        798MB ± 0%       797MB ± 0%  -0.05%        (p=0.000 n=19+20)
      
      name       old allocs/op    new allocs/op    delta
      Template         492k ± 0%        493k ± 0%  +0.03%        (p=0.030 n=20+20)
      Unicode          377k ± 0%        377k ± 0%    ~           (p=0.423 n=20+19)
      GoTypes         1.40M ± 0%       1.40M ± 0%    ~           (p=0.102 n=20+20)
      Compiler        5.53M ± 0%       5.53M ± 0%    ~           (p=0.094 n=17+18)
      
      name       old text-bytes   new text-bytes   delta
      HelloSize        561k ± 0%        561k ± 0%    ~     (all samples are equal)
      CmdGoSize       6.13M ± 0%       6.13M ± 0%    ~     (all samples are equal)
      
      name       old data-bytes   new data-bytes   delta
      HelloSize        128k ± 0%        128k ± 0%    ~     (all samples are equal)
      CmdGoSize        306k ± 0%        306k ± 0%    ~     (all samples are equal)
      
      name       old exe-bytes    new exe-bytes    delta
      HelloSize        905k ± 0%        905k ± 0%    ~     (all samples are equal)
      CmdGoSize       9.64M ± 0%       9.64M ± 0%    ~     (all samples are equal)
      
      Change-Id: Id774e2901d7701a3ec7a1c1d1cf1d9327a4107fc
      Reviewed-on: https://go-review.googlesource.com/21937
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarTodd Neal <todd@tneal.org>
      db5338f8
    • Keith Randall's avatar
      cmd/compile: fix arg to getcallerpc · 260b7daf
      Keith Randall authored
      getcallerpc's arg needs to point to the first argument slot.
      I believe this bug was introduced by Michel's itab changes
      (specifically https://go-review.googlesource.com/c/20902).
      
      Fixes #15145
      
      Change-Id: Ifb2e17f3658e2136c7950dfc789b4d5706320683
      Reviewed-on: https://go-review.googlesource.com/21931Reviewed-by: default avatarMichel Lespinasse <walken@google.com>
      260b7daf
    • Shahar Kohanim's avatar
      cmd/link: move function only lsym fields to pcln struct · b0cbe158
      Shahar Kohanim authored
      name       old secs    new secs    delta
      LinkCmdGo   0.53 ± 9%   0.53 ±10%  -1.30%  (p=0.022 n=100+99)
      
      name       old MaxRSS  new MaxRSS  delta
      LinkCmdGo   151k ± 4%   142k ± 6%  -5.92%  (p=0.000 n=98+100)
      
      Change-Id: Ic30e63a948f8e626b3396f458a0163f7234810c1
      Reviewed-on: https://go-review.googlesource.com/21920
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      b0cbe158
  2. 12 Apr, 2016 33 commits