1. 28 Mar, 2016 5 commits
    • Marvin Stenger's avatar
      cmd/internal/obj: convert fields of LSym from uint8 to bool · 2326c24c
      Marvin Stenger authored
      No performance regression measurable:
      
      name      old time/op    new time/op    delta
      Template     432ms ± 3%     422ms ± 2%  -2.34%   (p=0.010 n=10+9)
      GoTypes      1.46s ± 1%     1.46s ± 1%    ~     (p=0.796 n=10+10)
      Compiler     7.15s ± 1%     7.14s ± 1%    ~      (p=0.447 n=10+9)
      
      Change-Id: I21b93cb989017b6fec2215de2423d87f25cf538c
      Reviewed-on: https://go-review.googlesource.com/21220Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2326c24c
    • David Chase's avatar
      cmd/compile: added some intrinsics to SSA back end · 8eec2bbf
      David Chase authored
      One intrinsic was needed to help get the very best
      performance out of a future GC; as long as that one was
      being added, I also added Bswap since that is sometimes
      a handy thing to have.  I had intended to fill out the
      bit-scan intrinsic family, but the mismatch between the
      "scan forward" instruction and "count leading zeroes"
      was large enough to cause me to leave it out -- it poses
      a dilemma that I'd rather dodge right now.
      
      These intrinsics are not exposed for general use.
      That's a separate issue requiring an API proposal change
      ( https://github.com/golang/proposal )
      
      All intrinsics are tested, both that they are substituted
      on the appropriate architecture, and that they produce the
      expected result.
      
      Change-Id: I5848037cfd97de4f75bdc33bdd89bba00af4a8ee
      Reviewed-on: https://go-review.googlesource.com/20564Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8eec2bbf
    • Shahar Kohanim's avatar
      cmd/link: refactor symbol lookup · 2e90192b
      Shahar Kohanim authored
      Calling the read only Linkrlookup will now not cause the name
      string to escape. So a lookup can be performed on a []byte
      casted to a string without allocating. This will help a followup
      cl and it is also much simpler and cleaner.
      Performance not impacted by this.
      
      name       old s/op   new s/op   delta
      LinkCmdGo  0.51 ± 6%  0.51 ± 5%   ~     (p=0.192 n=98+98)
      
      Change-Id: I7846ba3160eb845a3a29cbf0be703c47369ece16
      Reviewed-on: https://go-review.googlesource.com/21187Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2e90192b
    • Ian Lance Taylor's avatar
      cmd/compile: clear OTFUNC info when converting to OTYPE · 7e88826a
      Ian Lance Taylor authored
      I want to get rid of OTFUNC, which serves no useful purpose.  However,
      it turns out that the escape analysis pass looks at the node slices set
      up for OTFUNC, even though by the time escape analysis runs the OTFUNC
      has been converted to OTYPE.  This CL converts the escape analysis code
      to look at the function decls instead, and clears the OTFUNC info when
      converting to OTYPE to ensure that nothing else looks at it.
      
      Change-Id: I3f2f5997ea8ea7a127a858e94b20aabfab84a5bf
      Reviewed-on: https://go-review.googlesource.com/21202
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      7e88826a
    • Dominik Honnef's avatar
      cmd/go: remove code specific to Google Code · aa482f97
      Dominik Honnef authored
      Remove all special handling of Google Code, which has shut down.
      
      Commit 4ec2fd3e suggested that maybe the
      shutdown warning should remain. However, it has been missing from Go 1.6
      already, and by Go 1.7 people will most likely have realised that Google
      Code has shut down.
      
      Updates #10193.
      
      Change-Id: I5749bbbe2fe3b07cff4edd20303bbedaeaa8d77b
      Reviewed-on: https://go-review.googlesource.com/21189Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      aa482f97
  2. 27 Mar, 2016 6 commits
    • Martin Möhrmann's avatar
      fmt: unify array and slice formatting for bytes and other types · 9149aa10
      Martin Möhrmann authored
      Make verbs b,c,o and U work for any array and slice of integer
      type including byte and uint8.
      
      Fix a bug that triggers badverb for []uint8 and []byte type
      on the slice/array level instead of on each element like for
      any other slice or array type.
      
      Add tests that make sure we do not accidentally alter the
      behavior of printing []byte for []byte and []uint8 type
      if they are used at the top level when formatting with %#v.
      
      name               old time/op  new time/op  delta
      SprintfHexBytes-2   177ns ± 2%   176ns ± 2%   ~     (p=0.066 n=48+49)
      SprintfBytes-2      330ns ± 1%   329ns ± 1%   ~     (p=0.118 n=45+47)
      
      Fixes #13478
      
      Change-Id: I99328a184973ae219bcc0f69c3978cb1ff462888
      Reviewed-on: https://go-review.googlesource.com/20686
      Run-TryBot: Rob Pike <r@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      9149aa10
    • Josh Bleecher Snyder's avatar
      cmd/compile: rename T_old_DARRAY and update comments · a637717e
      Josh Bleecher Snyder authored
      Change-Id: Ifa3b1b1e5458e4f109828a476d37f1caf96fe14b
      Reviewed-on: https://go-review.googlesource.com/21211
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      a637717e
    • Josh Bleecher Snyder's avatar
      cmd/compile: remove pointless conversions in copytype · fcca9d26
      Josh Bleecher Snyder authored
      Passes toolstash -cmp.
      
      Change-Id: I8b000d4e90e6aa1a0e60bd46fb7cba2ddc1774b5
      Reviewed-on: https://go-review.googlesource.com/21210
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      fcca9d26
    • Matthew Dempsky's avatar
      cmd/compile: fix stringtoslicebytetmp optimization · 995fb031
      Matthew Dempsky authored
      Fixes #14973.
      
      Change-Id: Iea68c9deca9429bde465c9ae05639209fe0ccf72
      Reviewed-on: https://go-review.googlesource.com/21175Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      995fb031
    • Dominik Honnef's avatar
      cmd/vet: don't treat fields like variables in rangeloop check · 4ffa5eb8
      Dominik Honnef authored
      Fixes #13236
      
      Change-Id: If902ac66718e0a0790fab9835921ce4ef980965b
      Reviewed-on: https://go-review.googlesource.com/21183
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      4ffa5eb8
    • Martin Möhrmann's avatar
      fmt: cleanup reflect value handling · d170d3ed
      Martin Möhrmann authored
      Merge printReflectValue into printValue. Determine if handleMethods
      was already called in printArg by checking if depth is 0. Do not
      call handleMethods on depth 0 again in printValue to not introduce
      a performance regression. handleMethods is called already in printArg
      to not introduce a performance penalty for top-level Stringer,
      GoStringer, Errors and Formatters by using reflect.ValueOf on them
      just to retrieve them again as interface{} values in printValue.
      
      Clear p.arg in printValue after handleMethods to print the type
      of the value inside the reflect.Value when a bad verb is encountered
      on the top level instead of printing "reflect.Value=" as the type of
      the argument. This also fixes a bug that incorrectly prints the
      whole map instead of just the value for a key if the returned value
      by the map for the key is an invalid reflect value.
      
      name                     old time/op  new time/op  delta
      SprintfPadding-2          229ns ± 2%   227ns ± 1%  -0.50%  (p=0.013 n=20+20)
      SprintfEmpty-2           36.4ns ± 6%  37.2ns ±14%    ~     (p=0.091 n=18+20)
      SprintfString-2           102ns ± 1%   102ns ± 0%    ~     (p=0.751 n=20+20)
      SprintfTruncateString-2   142ns ± 0%   141ns ± 1%  -0.95%  (p=0.000 n=16+20)
      SprintfQuoteString-2      389ns ± 0%   388ns ± 0%  -0.12%  (p=0.019 n=20+20)
      SprintfInt-2              100ns ± 2%   100ns ± 1%    ~     (p=0.188 n=20+15)
      SprintfIntInt-2           155ns ± 3%   154ns ± 2%    ~     (p=0.092 n=20+20)
      SprintfPrefixedInt-2      250ns ± 2%   251ns ± 3%    ~     (p=0.559 n=20+20)
      SprintfFloat-2            177ns ± 2%   175ns ± 1%  -1.30%  (p=0.000 n=20+20)
      SprintfComplex-2          516ns ± 1%   510ns ± 1%  -1.13%  (p=0.000 n=19+16)
      SprintfBoolean-2         90.9ns ± 3%  90.6ns ± 1%    ~     (p=0.193 n=19+19)
      SprintfHexString-2        171ns ± 1%   169ns ± 1%  -1.44%  (p=0.000 n=19+20)
      SprintfHexBytes-2         180ns ± 1%   180ns ± 1%    ~     (p=0.060 n=19+18)
      SprintfBytes-2            330ns ± 1%   329ns ± 1%  -0.42%  (p=0.003 n=20+20)
      SprintfStringer-2         354ns ± 3%   352ns ± 3%    ~     (p=0.525 n=20+19)
      SprintfStructure-2        804ns ± 3%   776ns ± 2%  -3.56%  (p=0.000 n=20+20)
      FprintInt-2               155ns ± 0%   151ns ± 1%  -2.35%  (p=0.000 n=19+20)
      FprintfBytes-2            169ns ± 0%   170ns ± 1%  +0.81%  (p=0.000 n=18+19)
      FprintIntNoAlloc-2        112ns ± 0%   109ns ± 1%  -2.28%  (p=0.000 n=20+20)
      
      Change-Id: Ib9a39082ed1be0f1f7499ee6fb6c9530f043e43a
      Reviewed-on: https://go-review.googlesource.com/20923
      Run-TryBot: Rob Pike <r@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      d170d3ed
  3. 26 Mar, 2016 8 commits
  4. 25 Mar, 2016 21 commits