1. 08 May, 2018 2 commits
  2. 07 May, 2018 13 commits
    • Richard Musiol's avatar
      cmd/link: add wasm architecture · f41dc711
      Richard Musiol authored
      This commit adds the wasm architecture to the link command.
      
      Design doc: https://docs.google.com/document/d/131vjr4DH6JFnb-blm_uRdaC0_Nv3OUwjEY5qVCxCup4
      
      Updates #18892
      
      Change-Id: I5aef29954984537f2979679b5d393209e462f564
      Reviewed-on: https://go-review.googlesource.com/103795
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      f41dc711
    • Ilya Tocar's avatar
      net: make IPString benchmarks more representative. · 406886b5
      Ilya Tocar authored
      We were spending more time in duffcopy than in the String method.
      Avoid creating a copy of test struct to make benchmark measure performance of
      String() itself.
      
      IPString/IPv4-8     113ns ± 0%      57ns ± 1%  -49.83%  (p=0.000 n=8+10)
      IPString/IPv6-8     972ns ± 1%     915ns ± 1%   -5.88%  (p=0.000 n=9+10)
      
      Change-Id: I5ceff2caa1b8288c43f0cf6c6b3809ca523af1fa
      Reviewed-on: https://go-review.googlesource.com/111881
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      406886b5
    • Josh Bleecher Snyder's avatar
      cmd/compile: add some LEAL{1,2,4,8} rewrite rules for AMD64 · b1df8d6f
      Josh Bleecher Snyder authored
      This should improve some 32 bit arithmetic operations.
      
      During make.bash, this increases the number of
      rules firing by 15518:
      
      $ wc -l rulelog-*
       13490514 rulelog-head
       13474996 rulelog-master
      
      compress/flate benchmarks:
      
      name                             old time/op    new time/op    delta
      Decode/Digits/Huffman/1e4-8         103µs ± 4%     102µs ± 0%  -0.95%  (p=0.000 n=30+27)
      Decode/Digits/Huffman/1e5-8         962µs ± 2%     954µs ± 1%  -0.80%  (p=0.000 n=25+25)
      Decode/Digits/Huffman/1e6-8        9.55ms ± 1%    9.50ms ± 1%  -0.57%  (p=0.000 n=29+29)
      Decode/Digits/Speed/1e4-8           110µs ± 2%     110µs ± 2%  -0.41%  (p=0.003 n=28+30)
      Decode/Digits/Speed/1e5-8          1.15ms ± 1%    1.14ms ± 1%  -0.85%  (p=0.000 n=29+28)
      Decode/Digits/Speed/1e6-8          11.5ms ± 2%    11.4ms ± 1%  -1.26%  (p=0.000 n=28+27)
      Decode/Digits/Default/1e4-8         113µs ± 1%     112µs ± 1%  -0.49%  (p=0.001 n=27+30)
      Decode/Digits/Default/1e5-8        1.13ms ± 0%    1.12ms ± 1%  -0.75%  (p=0.000 n=26+24)
      Decode/Digits/Default/1e6-8        11.1ms ± 1%    11.1ms ± 1%  -0.47%  (p=0.000 n=28+27)
      Decode/Digits/Compression/1e4-8     113µs ± 1%     112µs ± 1%  -0.70%  (p=0.000 n=28+29)
      Decode/Digits/Compression/1e5-8    1.13ms ± 2%    1.12ms ± 1%  -1.41%  (p=0.000 n=28+26)
      Decode/Digits/Compression/1e6-8    11.1ms ± 1%    11.1ms ± 1%  -0.33%  (p=0.002 n=29+27)
      Decode/Twain/Huffman/1e4-8          115µs ± 1%     115µs ± 1%  -0.40%  (p=0.000 n=28+26)
      Decode/Twain/Huffman/1e5-8         1.05ms ± 1%    1.04ms ± 0%  -0.41%  (p=0.000 n=27+25)
      Decode/Twain/Huffman/1e6-8         10.4ms ± 1%    10.4ms ± 1%    ~     (p=0.993 n=28+24)
      Decode/Twain/Speed/1e4-8            118µs ± 2%     116µs ± 1%  -1.08%  (p=0.000 n=27+29)
      Decode/Twain/Speed/1e5-8           1.07ms ± 1%    1.07ms ± 1%  -0.23%  (p=0.041 n=26+27)
      Decode/Twain/Speed/1e6-8           10.6ms ± 1%    10.5ms ± 0%  -0.68%  (p=0.000 n=29+27)
      Decode/Twain/Default/1e4-8          110µs ± 1%     109µs ± 0%  -0.49%  (p=0.000 n=29+26)
      Decode/Twain/Default/1e5-8          906µs ± 1%     902µs ± 1%  -0.48%  (p=0.000 n=27+28)
      Decode/Twain/Default/1e6-8         8.75ms ± 1%    8.68ms ± 2%  -0.73%  (p=0.000 n=28+28)
      Decode/Twain/Compression/1e4-8      110µs ± 1%     109µs ± 1%  -0.80%  (p=0.000 n=27+28)
      Decode/Twain/Compression/1e5-8      905µs ± 1%     906µs ± 5%    ~     (p=0.065 n=27+29)
      Decode/Twain/Compression/1e6-8     8.75ms ± 2%    8.68ms ± 1%  -0.76%  (p=0.000 n=26+26)
      Encode/Digits/Huffman/1e4-8        31.8µs ± 1%    32.3µs ± 2%  +1.43%  (p=0.000 n=28+27)
      Encode/Digits/Huffman/1e5-8         299µs ± 2%     296µs ± 1%  -1.05%  (p=0.000 n=29+29)
      Encode/Digits/Huffman/1e6-8        2.99ms ± 3%    2.96ms ± 1%  -1.00%  (p=0.000 n=29+28)
      Encode/Digits/Speed/1e4-8           149µs ± 1%     152µs ± 4%  +2.18%  (p=0.000 n=30+30)
      Encode/Digits/Speed/1e5-8          1.39ms ± 1%    1.40ms ± 2%  +1.02%  (p=0.000 n=27+27)
      Encode/Digits/Speed/1e6-8          13.7ms ± 0%    13.8ms ± 1%  +0.81%  (p=0.000 n=27+27)
      Encode/Digits/Default/1e4-8         297µs ± 7%     297µs ± 7%    ~     (p=1.000 n=30+30)
      Encode/Digits/Default/1e5-8        4.51ms ± 1%    4.42ms ± 1%  -2.06%  (p=0.000 n=29+29)
      Encode/Digits/Default/1e6-8        47.5ms ± 1%    46.6ms ± 1%  -1.90%  (p=0.000 n=27+25)
      Encode/Digits/Compression/1e4-8     302µs ± 7%     303µs ± 9%    ~     (p=0.854 n=30+30)
      Encode/Digits/Compression/1e5-8    4.52ms ± 1%    4.43ms ± 2%  -1.91%  (p=0.000 n=26+25)
      Encode/Digits/Compression/1e6-8    47.5ms ± 1%    46.7ms ± 1%  -1.70%  (p=0.000 n=26+27)
      Encode/Twain/Huffman/1e4-8         46.6µs ± 2%    46.8µs ± 2%    ~     (p=0.114 n=30+30)
      Encode/Twain/Huffman/1e5-8          357µs ± 3%     352µs ± 2%  -1.13%  (p=0.000 n=29+28)
      Encode/Twain/Huffman/1e6-8         3.58ms ± 4%    3.52ms ± 1%  -1.43%  (p=0.003 n=30+28)
      Encode/Twain/Speed/1e4-8            173µs ± 1%     174µs ± 1%  +0.65%  (p=0.000 n=27+28)
      Encode/Twain/Speed/1e5-8           1.39ms ± 1%    1.40ms ± 1%  +0.92%  (p=0.000 n=28+27)
      Encode/Twain/Speed/1e6-8           13.6ms ± 1%    13.7ms ± 1%  +0.51%  (p=0.000 n=25+26)
      Encode/Twain/Default/1e4-8          364µs ± 5%     361µs ± 5%    ~     (p=0.219 n=30+30)
      Encode/Twain/Default/1e5-8         5.41ms ± 1%    5.43ms ± 5%    ~     (p=0.655 n=27+27)
      Encode/Twain/Default/1e6-8         57.2ms ± 1%    58.4ms ± 4%  +2.15%  (p=0.000 n=22+28)
      Encode/Twain/Compression/1e4-8      371µs ± 9%     373µs ± 6%    ~     (p=0.503 n=30+29)
      Encode/Twain/Compression/1e5-8     5.97ms ± 2%    5.92ms ± 1%  -0.75%  (p=0.000 n=28+26)
      Encode/Twain/Compression/1e6-8     64.0ms ± 1%    63.8ms ± 1%  -0.36%  (p=0.036 n=27+25)
      [Geo mean]                         1.37ms         1.36ms       -0.38%
      
      
      Change-Id: I3df4de63f06eaf121c38821bd889453a8de1b199
      Reviewed-on: https://go-review.googlesource.com/101276Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      b1df8d6f
    • Austin Clements's avatar
      runtime: replace system goroutine whitelist with symbol test · 44286b17
      Austin Clements authored
      Currently isSystemGoroutine has a hard-coded list of known entry
      points into system goroutines. This list is annoying to maintain. For
      example, it's missing the ensureSigM goroutine.
      
      Replace it with a check that simply looks for any goroutine with
      runtime function as its entry point, with a few exceptions. This also
      matches the definition recently added to the trace viewer (CL 81315).
      
      Change-Id: Iaed723d4a6e8c2ffb7c0c48fbac1688b00b30f01
      Reviewed-on: https://go-review.googlesource.com/81655
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      44286b17
    • Keith Randall's avatar
      cmd/compile: mention the AuxInt field for bounded shifts · a8a05081
      Keith Randall authored
      This comment needs updating after moving the "bounded" mark from
      Aux to AuxInt.
      
      Change-Id: I924fb22a81fffcd6944b93f0e3357c3aa2c4c49e
      Reviewed-on: https://go-review.googlesource.com/111880Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      a8a05081
    • Sabin Mihai Rapan's avatar
      strconv: update Unquote example to be more concise · 74879f0f
      Sabin Mihai Rapan authored
      Changed the example to convey the intent of the Unquote function
      in a more succint way.
      
      Fixes #23693
      
      Change-Id: I49465641d730e70b5af0d47057335af39882bcec
      Reviewed-on: https://go-review.googlesource.com/92015Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      74879f0f
    • Brad Fitzpatrick's avatar
      vendor, net/http: update x/net for httplex to httpguts merge · 8e9386db
      Brad Fitzpatrick authored
      Updates x/net to git rev cbb82b59bc for:
      
          lex/httplex, http/httpguts: merge the httplex package into httpguts
          https://golang.org/cl/111875
      
          http2: set nextStreamID to 3 when AllowHTTP is set
          https://golang.org/cl/111835
      
          http2: terminate await request cancel goroutine on conn close
          https://golang.org/cl/108415
      
      Fixes #24776 (CL 111655 didn't actually include it)
      
      Change-Id: I0a21e169ebba2ec35219f347f1e31cd4c67bebdf
      Reviewed-on: https://go-review.googlesource.com/111876
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarKunpei Sakai <namusyaka@gmail.com>
      Reviewed-by: 's avatarAndrew Bonventre <andybons@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8e9386db
    • Elias Naur's avatar
      misc/ios: uninstall app before installing it · 9b16b9c7
      Elias Naur authored
      Tests can fail because there is leftover data from a previous run.
      For example:
      
      --- FAIL: TestRemoveAll (0.00s)
      	path_test.go:96: RemoveAll "/private/var/mobile/Containers/Data/Application/66247524-5ED7-45A4-82AA-6BF15D6078B2/tmp//_TestRemoveAll_" (first): open /private/var/mobile/Containers/Data/Application/66247524-5ED7-45A4-82AA-6BF15D6078B2/tmp//_TestRemoveAll_/dir: permission denied
      FAIL
      FAIL	os	31.275s
      
      There seem to be no way to simply clear the app data for an app
      short of uninstalling it, so do that.
      
      This change in effect undoes CL 106676, which means that running iOS
      is a little slower again, and that another app from the same
      apple developer account must be present on the device for our app
      install to succeed.
      
      Change-Id: Iacc3a6f95c93568f4418db45e1098c7c7fdb88e0
      Reviewed-on: https://go-review.googlesource.com/111795
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      9b16b9c7
    • Josh Bleecher Snyder's avatar
      text/tabwriter: don't mimic previous lines on flush · a33c5957
      Josh Bleecher Snyder authored
      \f triggers a flush.
      
      This is used (by gofmt, among others) to indicate that
      the current aligned segment has ended.
      
      When flushed, it is unlikely that the previous line is
      in fact a good predictor of the upcoming line,
      so stop treating it as such.
      
      No performance impact on the existing benchmarks,
      which do not perform any flushes.
      
      Change-Id: Ifdf3e6d4600713c90db7b51a10e429d9260dc08c
      Reviewed-on: https://go-review.googlesource.com/111644Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      a33c5957
    • Daniel Martí's avatar
      cmd/vet: recognise func type conversions · 3fbfc83d
      Daniel Martí authored
      In hasSideEffects, vet has to be taught whether or not a CallExpr is an
      actual function call, or just a type conversion.
      
      The previous code knew how to differentiate fn(arg) from int(arg), but
      it incorrectly saw (func(T))(fn) as a func call. This edge case is
      slightly tricky, since the CallExpr.Fun has a func signature type, just
      like in func calls.
      
      However, the difference is that in this case the Fun is a type, not a
      value. This information is in types.TypeAndValue, so use it.
      
      Change-Id: I18bb8b23abbe7decc558b726ff2dc31fae2f13d6
      Reviewed-on: https://go-review.googlesource.com/111416
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      3fbfc83d
    • Russ Cox's avatar
      compress/flate: do not rename math/bits import · d474f582
      Russ Cox authored
      Makes compress/flate work better with cmd/dist bootstrap.
      
      Change-Id: Ifc7d74027367008e82c1d14ec77141830583ba82
      Reviewed-on: https://go-review.googlesource.com/111815
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d474f582
    • fanzha02's avatar
      cmd/internal/obj/arm64: fix illegal 4-operand instructions accepted arm64 bug · 9d72e8c6
      fanzha02 authored
      Current assmbler accepts MUL* related instructions with 4 operands,
      such as instruction "MUL R1, R2, R3, R4", which is illegal.
      
      The fix adds an actual field informantion to Optab, which has value
      of C_NONE, C_REG, etc, so assembler can use p.From3Type for checking
      in oplook.
      
      Add test cases.
      
      Fixes #25059
      
      Change-Id: I0656319383c460696b392197bf5960b987f8fc97
      Reviewed-on: https://go-review.googlesource.com/109295Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      9d72e8c6
    • Zhou Peng's avatar
      runtime: fix a typo mistake in comments · 7b7a854c
      Zhou Peng authored
      Change-Id: I33790af9fd0c2f6fdeaf9778c1381e0e6d697abb
      Reviewed-on: https://go-review.googlesource.com/111755Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      7b7a854c
  3. 06 May, 2018 7 commits
    • Author Name's avatar
      io: calculate buffer size only when needed · 15ac56fd
      Author Name authored
      Change-Id: I930be9027fb972198b3d44816a5e4f53ff7eb5ea
      Reviewed-on: https://go-review.googlesource.com/111642Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      15ac56fd
    • Josh Bleecher Snyder's avatar
      cmd/compile: use slice extension idiom in LSym.Grow · c9c73978
      Josh Bleecher Snyder authored
      name        old alloc/op      new alloc/op      delta
      Template         35.0MB ± 0%       35.0MB ± 0%  -0.05%  (p=0.008 n=5+5)
      Unicode          29.3MB ± 0%       29.3MB ± 0%    ~     (p=0.310 n=5+5)
      GoTypes           115MB ± 0%        115MB ± 0%  -0.08%  (p=0.008 n=5+5)
      Compiler          519MB ± 0%        519MB ± 0%  -0.08%  (p=0.008 n=5+5)
      SSA              1.59GB ± 0%       1.59GB ± 0%  -0.05%  (p=0.008 n=5+5)
      Flate            24.2MB ± 0%       24.2MB ± 0%  -0.06%  (p=0.008 n=5+5)
      GoParser         28.2MB ± 0%       28.1MB ± 0%  -0.04%  (p=0.016 n=5+5)
      Reflect          78.8MB ± 0%       78.7MB ± 0%  -0.10%  (p=0.008 n=5+5)
      Tar              34.5MB ± 0%       34.4MB ± 0%  -0.07%  (p=0.008 n=5+5)
      XML              43.3MB ± 0%       43.2MB ± 0%  -0.09%  (p=0.008 n=5+5)
      [Geo mean]       77.5MB            77.4MB       -0.06%
      
      name        old allocs/op     new allocs/op     delta
      Template           330k ± 0%         329k ± 0%  -0.32%  (p=0.008 n=5+5)
      Unicode            337k ± 0%         336k ± 0%  -0.10%  (p=0.008 n=5+5)
      GoTypes           1.15M ± 0%        1.14M ± 0%  -0.34%  (p=0.008 n=5+5)
      Compiler          4.78M ± 0%        4.77M ± 0%  -0.25%  (p=0.008 n=5+5)
      SSA               12.9M ± 0%        12.9M ± 0%  -0.12%  (p=0.008 n=5+5)
      Flate              221k ± 0%         220k ± 0%  -0.32%  (p=0.008 n=5+5)
      GoParser           275k ± 0%         274k ± 0%  -0.34%  (p=0.008 n=5+5)
      Reflect            944k ± 0%         940k ± 0%  -0.42%  (p=0.008 n=5+5)
      Tar                323k ± 0%         322k ± 0%  -0.31%  (p=0.008 n=5+5)
      XML                384k ± 0%         383k ± 0%  -0.26%  (p=0.008 n=5+5)
      [Geo mean]         749k              747k       -0.28%
      
      
      Updates #21266
      
      Change-Id: I926ee3ba009c068239db70cdee8fdf85b5ee6bb4
      Reviewed-on: https://go-review.googlesource.com/109816
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      c9c73978
    • Kunpei Sakai's avatar
      net/http: update bundled http2 · 260ae19c
      Kunpei Sakai authored
      Updates http2 to x/net/http2 git rev 5f9ae10 for:
      
          http2: terminate await request cancel goroutine on conn close
          https://golang.org/cl/108415
      
          http2: don't sniff Content-type in Server when X-Content-Type-Options:nosniff
          https://golang.org/cl/107295
      
          http2, http/httpguts: move ValidTrailerHeader to new common package http/httpguts
          https://golang.org/cl/104042
      
          all: remove "the" duplications
          https://golang.org/cl/94975
      
          http2: use RFC 723x as normative reference in docs
          https://golang.org/cl/94555
      
          all: use HTTPS for iana.org links
          https://golang.org/cl/89415
      
      Fixes #24795
      Fixes #24776
      Updates #23908
      Fixes #21974
      
      Change-Id: I7985617a7dde56cc5ed8670d73b26f8307be83d6
      Reviewed-on: https://go-review.googlesource.com/111655Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      260ae19c
    • Martin Möhrmann's avatar
      runtime: remove hmap field from maptypes · 4ebc67d3
      Martin Möhrmann authored
      The hmap field in the maptype is only used by the runtime to check the sizes of
      the hmap structure created by the compiler and runtime agree.
      
      Comments are already present about the hmap structure definitions in the
      compiler and runtime needing to be in sync.
      
      Add a test that checks the runtimes hmap size is as expected to detect
      when the compilers and runtimes hmap sizes diverge instead of checking
      this at runtime when a map is created.
      
      Change-Id: I974945ebfdb66883a896386a17bbcae62a18cf2a
      Reviewed-on: https://go-review.googlesource.com/91796
      Run-TryBot: Martin Möhrmann <moehrmann@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      4ebc67d3
    • Martin Möhrmann's avatar
      cmd/compile: optimize len([]rune(string)) · b9a59d9f
      Martin Möhrmann authored
      Adds a new runtime function to count runes in a string.
      Modifies the compiler to detect the pattern len([]rune(string))
      and replaces it with the new rune counting runtime function.
      
      RuneCount/lenruneslice/ASCII                  27.8ns ± 2%  14.5ns ± 3%  -47.70%  (p=0.000 n=10+10)
      RuneCount/lenruneslice/Japanese                126ns ± 2%    60ns ± 2%  -52.03%  (p=0.000 n=10+10)
      RuneCount/lenruneslice/MixedLength             104ns ± 2%    50ns ± 1%  -51.71%  (p=0.000 n=10+9)
      
      Fixes #24923
      
      Change-Id: Ie9c7e7391a4e2cca675c5cdcc1e5ce7d523948b9
      Reviewed-on: https://go-review.googlesource.com/108985
      Run-TryBot: Martin Möhrmann <moehrmann@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      b9a59d9f
    • Martin Möhrmann's avatar
      cmd/compile: optimize append(x, make([]T, y)...) slice extension · a8a60ac2
      Martin Möhrmann authored
      Changes the compiler to recognize the slice extension pattern
      
        append(x, make([]T, y)...)
      
      and replace it with growslice and an optional memclr to avoid an allocation for make([]T, y).
      
      Memclr is not called in case growslice already allocated a new cleared backing array
      when T contains pointers.
      
      amd64:
      name                      old time/op    new time/op    delta
      ExtendSlice/IntSlice         103ns ± 4%      57ns ± 4%   -44.55%  (p=0.000 n=18+18)
      ExtendSlice/PointerSlice     155ns ± 3%      77ns ± 3%   -49.93%  (p=0.000 n=20+20)
      ExtendSlice/NoGrow          50.2ns ± 3%     5.2ns ± 2%   -89.67%  (p=0.000 n=18+18)
      
      name                      old alloc/op   new alloc/op   delta
      ExtendSlice/IntSlice         64.0B ± 0%     32.0B ± 0%   -50.00%  (p=0.000 n=20+20)
      ExtendSlice/PointerSlice     64.0B ± 0%     32.0B ± 0%   -50.00%  (p=0.000 n=20+20)
      ExtendSlice/NoGrow           32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=20+20)
      
      name                      old allocs/op  new allocs/op  delta
      ExtendSlice/IntSlice          2.00 ± 0%      1.00 ± 0%   -50.00%  (p=0.000 n=20+20)
      ExtendSlice/PointerSlice      2.00 ± 0%      1.00 ± 0%   -50.00%  (p=0.000 n=20+20)
      ExtendSlice/NoGrow            1.00 ± 0%      0.00       -100.00%  (p=0.000 n=20+20)
      
      Fixes #21266
      
      Change-Id: Idc3077665f63cbe89762b590c5967a864fd1c07f
      Reviewed-on: https://go-review.googlesource.com/109517
      Run-TryBot: Martin Möhrmann <moehrmann@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      a8a60ac2
    • Josh Bleecher Snyder's avatar
      text/tabwriter: fix BenchmarkPyramid and BenchmarkRagged · 87412a14
      Josh Bleecher Snyder authored
      These were added in CL 106979. They were wrong.
      
      The correct impact of CL 106979 on these benchmarks is:
      
      name            old time/op    new time/op    delta
      Pyramid/10-8      6.22µs ± 1%    5.68µs ± 0%    -8.78%  (p=0.000 n=15+13)
      Pyramid/100-8      275µs ± 1%     255µs ± 1%    -7.30%  (p=0.000 n=15+13)
      Pyramid/1000-8    25.6ms ± 1%    24.8ms ± 1%    -2.88%  (p=0.000 n=15+14)
      Ragged/10-8       8.98µs ± 1%    6.74µs ± 0%   -24.98%  (p=0.000 n=15+14)
      Ragged/100-8      85.3µs ± 0%    57.5µs ± 1%   -32.51%  (p=0.000 n=13+15)
      Ragged/1000-8      847µs ± 1%     561µs ± 1%   -33.85%  (p=0.000 n=14+15)
      
      name            old alloc/op   new alloc/op   delta
      Pyramid/10-8      4.74kB ± 0%    4.88kB ± 0%    +3.04%  (p=0.000 n=15+15)
      Pyramid/100-8      379kB ± 0%     411kB ± 0%    +8.50%  (p=0.000 n=15+12)
      Pyramid/1000-8    35.3MB ± 0%    41.6MB ± 0%   +17.68%  (p=0.000 n=15+15)
      Ragged/10-8       4.82kB ± 0%    1.82kB ± 0%   -62.13%  (p=0.000 n=15+15)
      Ragged/100-8      45.4kB ± 0%     1.8kB ± 0%   -95.98%  (p=0.000 n=15+15)
      Ragged/1000-8      449kB ± 0%       2kB ± 0%   -99.59%  (p=0.000 n=15+15)
      
      name            old allocs/op  new allocs/op  delta
      Pyramid/10-8        50.0 ± 0%      35.0 ± 0%   -30.00%  (p=0.000 n=15+15)
      Pyramid/100-8        704 ± 0%       231 ± 0%   -67.19%  (p=0.000 n=15+15)
      Pyramid/1000-8     10.0k ± 0%      2.1k ± 0%   -79.52%  (p=0.000 n=15+15)
      Ragged/10-8         60.0 ± 0%      19.0 ± 0%   -68.33%  (p=0.000 n=15+15)
      Ragged/100-8         511 ± 0%        19 ± 0%   -96.28%  (p=0.000 n=15+15)
      Ragged/1000-8      5.01k ± 0%     0.02k ± 0%   -99.62%  (p=0.000 n=15+15)
      
      
      This is an improvement over what was originally reported,
      except the increase in alloc/op for the Pyramid benchmarks.
      
      Change-Id: Ib2617c1288ce35f2c78e0172533d231b86e48bc2
      Reviewed-on: https://go-review.googlesource.com/111643
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      87412a14
  4. 05 May, 2018 3 commits
  5. 04 May, 2018 15 commits