1. 26 Sep, 2018 5 commits
    • Brian Kessler's avatar
      cmd/compile: intrinsify math/bits.Mul · 9eb53ab9
      Brian Kessler authored
      Add SSA rules to intrinsify Mul/Mul64 (AMD64 and ARM64).
      SSA rules for other functions and architectures are left as a future
      optimization.  Benchmark results on AMD64/ARM64 before and after SSA
      implementation are below.
      
      amd64
      name     old time/op  new time/op  delta
      Add-4    1.78ns ± 0%  1.85ns ±12%     ~     (p=0.397 n=4+5)
      Add32-4  1.71ns ± 1%  1.70ns ± 0%     ~     (p=0.683 n=5+5)
      Add64-4  1.80ns ± 2%  1.77ns ± 0%   -1.22%  (p=0.048 n=5+5)
      Sub-4    1.78ns ± 0%  1.78ns ± 0%     ~     (all equal)
      Sub32-4  1.78ns ± 1%  1.78ns ± 0%     ~     (p=1.000 n=5+5)
      Sub64-4  1.78ns ± 1%  1.78ns ± 0%     ~     (p=0.968 n=5+4)
      Mul-4    11.5ns ± 1%   1.8ns ± 2%  -84.39%  (p=0.008 n=5+5)
      Mul32-4  1.39ns ± 0%  1.38ns ± 3%     ~     (p=0.175 n=5+5)
      Mul64-4  6.85ns ± 1%  1.78ns ± 1%  -73.97%  (p=0.008 n=5+5)
      Div-4    57.1ns ± 1%  56.7ns ± 0%     ~     (p=0.087 n=5+5)
      Div32-4  18.0ns ± 0%  18.0ns ± 0%     ~     (all equal)
      Div64-4  56.4ns ±10%  53.6ns ± 1%     ~     (p=0.071 n=5+5)
      
      arm64
      name      old time/op  new time/op  delta
      Add-96    5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Add32-96  5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Add64-96  5.52ns ± 0%  5.51ns ± 0%     ~     (p=0.444 n=5+5)
      Sub-96    5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Sub32-96  5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Sub64-96  5.51ns ± 0%  5.51ns ± 0%     ~     (all equal)
      Mul-96    34.6ns ± 0%   5.0ns ± 0%  -85.52%  (p=0.008 n=5+5)
      Mul32-96  4.51ns ± 0%  4.51ns ± 0%     ~     (all equal)
      Mul64-96  21.1ns ± 0%   5.0ns ± 0%  -76.26%  (p=0.008 n=5+5)
      Div-96    64.7ns ± 0%  64.7ns ± 0%     ~     (all equal)
      Div32-96  17.0ns ± 0%  17.0ns ± 0%     ~     (all equal)
      Div64-96  53.1ns ± 0%  53.1ns ± 0%     ~     (all equal)
      
      Updates #24813
      
      Change-Id: I9bda6d2102f65cae3d436a2087b47ed8bafeb068
      Reviewed-on: https://go-review.googlesource.com/129415
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      9eb53ab9
    • Brad Fitzpatrick's avatar
      Revert "net/url: escape URL.RawQuery on Parse if it contains invalid characters" · b50210f5
      Brad Fitzpatrick authored
      This reverts commit CL 99135 (git rev 1040626c).
      
      Reason for revert: breaks valid code; see #27302
      
      Fixes #27302
      Updates #22907
      
      Change-Id: I82bb0c28ae1683140c71e7a2224c4ded3f4acea1
      Reviewed-on: https://go-review.googlesource.com/137716Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b50210f5
    • Alberto Donizetti's avatar
      cmd/compile: update TestNexting golden file · 541f9c03
      Alberto Donizetti authored
      This change updates the expected output of the gdb debugging session
      in the TestNexting internal/ssa test, aligning it with the changes
      introduced in CL 134555.
      
      Fixes #27863
      
      Change-Id: I29e747930c7668b429e8936ad230c4d6aa24fdac
      Reviewed-on: https://go-review.googlesource.com/137455Reviewed-by: 's avatarThan McIntosh <thanm@google.com>
      541f9c03
    • Tom Thorogood's avatar
      strings: use Builder in ToUpper and ToLower · 14e7f174
      Tom Thorogood authored
      Map was optimized to use Builder in 45c7d808, which avoided the []byte
      to string converstion. This left the ToUpper and ToLower ASCII fast path
      with an extra allocation over Map.
      
      name                                        old time/op    new time/op    delta
      ToUpper/#00-12                                3.59ns ± 4%    3.71ns ± 1%     ~     (p=0.056 n=5+5)
      ToUpper/ONLYUPPER-12                          11.8ns ± 2%    10.5ns ± 2%  -10.85%  (p=0.008 n=5+5)
      ToUpper/abc-12                                31.8ns ± 1%    25.3ns ± 1%  -20.40%  (p=0.008 n=5+5)
      ToUpper/AbC123-12                             46.2ns ± 7%    31.9ns ± 8%  -30.89%  (p=0.008 n=5+5)
      ToUpper/azAZ09_-12                            47.1ns ± 8%    32.6ns ± 4%  -30.77%  (p=0.008 n=5+5)
      ToUpper/longStrinGwitHmixofsmaLLandcAps-12     137ns ±15%     104ns ±11%  -24.11%  (p=0.008 n=5+5)
      ToUpper/longɐstringɐwithɐnonasciiⱯchars-12     231ns ± 1%     228ns ± 1%     ~     (p=0.079 n=5+5)
      ToUpper/ɐɐɐɐɐ-12                               207ns ± 3%     206ns ± 1%     ~     (p=0.913 n=5+5)
      ToUpper/a\u0080\U0010ffff-12                  90.8ns ± 1%    89.6ns ± 1%   -1.30%  (p=0.024 n=5+5)
      ToLower/#00-12                                3.59ns ± 1%    4.26ns ± 2%  +18.66%  (p=0.008 n=5+5)
      ToLower/abc-12                                6.32ns ± 1%    6.62ns ± 1%   +4.72%  (p=0.008 n=5+5)
      ToLower/AbC123-12                             45.0ns ±13%    31.5ns ± 4%  -29.89%  (p=0.008 n=5+5)
      ToLower/azAZ09_-12                            48.8ns ± 6%    33.2ns ± 3%  -31.91%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps-12     149ns ±13%      98ns ± 8%  -34.30%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS-12     237ns ± 4%     237ns ± 2%     ~     (p=0.635 n=5+5)
      ToLower/ⱭⱭⱭⱭⱭ-12                               181ns ± 1%     181ns ± 1%     ~     (p=0.762 n=5+5)
      ToLower/A\u0080\U0010ffff-12                  90.6ns ± 1%    92.5ns ± 1%   +2.05%  (p=0.016 n=5+5)
      
      name                                        old alloc/op   new alloc/op   delta
      ToUpper/#00-12                                 0.00B          0.00B          ~     (all equal)
      ToUpper/ONLYUPPER-12                           0.00B          0.00B          ~     (all equal)
      ToUpper/abc-12                                 6.00B ± 0%     3.00B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/AbC123-12                              16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/azAZ09_-12                             16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longStrinGwitHmixofsmaLLandcAps-12     64.0B ± 0%     32.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longɐstringɐwithɐnonasciiⱯchars-12     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      ToUpper/ɐɐɐɐɐ-12                               48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      ToUpper/a\u0080\U0010ffff-12                   16.0B ± 0%     16.0B ± 0%     ~     (all equal)
      ToLower/#00-12                                 0.00B          0.00B          ~     (all equal)
      ToLower/abc-12                                 0.00B          0.00B          ~     (all equal)
      ToLower/AbC123-12                              16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/azAZ09_-12                             16.0B ± 0%      8.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps-12     64.0B ± 0%     32.0B ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS-12     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      ToLower/ⱭⱭⱭⱭⱭ-12                               32.0B ± 0%     32.0B ± 0%     ~     (all equal)
      ToLower/A\u0080\U0010ffff-12                   16.0B ± 0%     16.0B ± 0%     ~     (all equal)
      
      name                                        old allocs/op  new allocs/op  delta
      ToUpper/#00-12                                  0.00           0.00          ~     (all equal)
      ToUpper/ONLYUPPER-12                            0.00           0.00          ~     (all equal)
      ToUpper/abc-12                                  2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/AbC123-12                               2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/azAZ09_-12                              2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longStrinGwitHmixofsmaLLandcAps-12      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToUpper/longɐstringɐwithɐnonasciiⱯchars-12      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToUpper/ɐɐɐɐɐ-12                                2.00 ± 0%      2.00 ± 0%     ~     (all equal)
      ToUpper/a\u0080\U0010ffff-12                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToLower/#00-12                                  0.00           0.00          ~     (all equal)
      ToLower/abc-12                                  0.00           0.00          ~     (all equal)
      ToLower/AbC123-12                               2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/azAZ09_-12                              2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps-12      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS-12      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToLower/ⱭⱭⱭⱭⱭ-12                                1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      ToLower/A\u0080\U0010ffff-12                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
      
      Updates #26304
      
      Change-Id: I4179e21d5e60d950b925fe3ffc74b376b82812d2
      GitHub-Last-Rev: 2c7c3bb75b8fb16fed5f0c8979ee9941675ed6bf
      GitHub-Pull-Request: golang/go#27872
      Reviewed-on: https://go-review.googlesource.com/137575
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      14e7f174
    • Ingo Oeser's avatar
      net/http: configure http2 transport only once · 1058aecf
      Ingo Oeser authored
      it looks like we should abort trying to configure the http2 transport
      again, once it has been configured already.
      
      Otherwise there will be no effect of these checks and changes, as they
      will be overridden later again and the disable logic below will have no
      effect, too.
      
      So it really looks like we just forgot a return statement here.
      
      Change-Id: Ic99b3bbc662a4e1e1bdbde77681bd1ae597255ad
      Reviewed-on: https://go-review.googlesource.com/134795Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1058aecf
  2. 25 Sep, 2018 13 commits
  3. 24 Sep, 2018 17 commits
    • Brad Fitzpatrick's avatar
      cmd/compile/internal/ssa: fix a typo · 0ee8a559
      Brad Fitzpatrick authored
      Change-Id: Ie3a8c54fe5e1b94f506cc0e6f650aab441d28a75
      Reviewed-on: https://go-review.googlesource.com/137115Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      0ee8a559
    • Alberto Donizetti's avatar
      test: restore binary.BigEndian use in checkbce · 8c1c6702
      Alberto Donizetti authored
      CL 136855 removed the encoding/binary dependency from the checkbce.go
      test by defining a local Uint64 to fix the noopt builder; then a more
      general mechanism to skip tests on the noopt builder was introduced in
      CL 136898, so we can now restore the binary.Uint64 calls in testbce.
      
      Change-Id: I3efbb41be0bfc446a7e638ce6a593371ead2684f
      Reviewed-on: https://go-review.googlesource.com/137056
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      Reviewed-by: 's avatarGiovanni Bajo <rasky@develer.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8c1c6702
    • Rob Pike's avatar
      fmt: unify the printing examples · 5be78668
      Rob Pike authored
      Provide an example for each of the printing functions (Print,
      Sprintf, Fprintln etc.), and make them all produce the same output
      so their usage can be compared.
      
      Also add a package-level example explaining the difference between
      how Printf, Println, and Print behave.
      
      There are more examples to come.
      
      Update #27554.
      
      Change-Id: Ide03e5233f3762a9ee2ac0269f534ab927562ce2
      Reviewed-on: https://go-review.googlesource.com/136615Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5be78668
    • Robert Griesemer's avatar
      spec: be more precise about the moment deferred functions are executed · 206fd788
      Robert Griesemer authored
      Fixes #27802.
      
      Change-Id: I7ea9f7279300a55b0cb851893edc591a6f84e324
      Reviewed-on: https://go-review.googlesource.com/136758Reviewed-by: 's avatarRob Pike <r@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      206fd788
    • Rob Pike's avatar
      fmt: add a package-level example illustrating basic formats · c5a8d1d2
      Rob Pike authored
      There is much left out here—the space of possibilities is very
      large—but this example shows all that most programmers will need
      to know for most printing problems.
      
      Update #27554.
      
      Change-Id: Ib6ae651d5c3720cf7fe1a05ffd0859a5b56a9157
      Reviewed-on: https://go-review.googlesource.com/136616Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      c5a8d1d2
    • Brad Fitzpatrick's avatar
      test: skip some tests on noopt builder · b3369063
      Brad Fitzpatrick authored
      Adds a new build tag "gcflags_noopt" that can be used in test/*.go
      tests.
      
      Fixes #27833
      
      Change-Id: I4ea0ccd9e9e58c4639de18645fec81eb24a3a929
      Reviewed-on: https://go-review.googlesource.com/136898
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      b3369063
    • Brad Fitzpatrick's avatar
      cmd/vendor: update golang.org/x/sys/windows for windows/arm support · 01b7c2db
      Brad Fitzpatrick authored
      Updates to golang.org/x/sys git rev 90868a75f.
      
      Updates golang/go#26148
      
      Change-Id: Ic687e7e0e171690e8d937c7bb29b0e55316f874a
      Reviewed-on: https://go-review.googlesource.com/137015Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      01b7c2db
    • Keith Randall's avatar
      cmd/compile: document regalloc fields · f493e557
      Keith Randall authored
      Document what the fields of regalloc mean.
      Hopefully will help people understand how the register allocator works.
      
      Change-Id: Ic322ed2019cc839b812740afe8cd2cf0b61da046
      Reviewed-on: https://go-review.googlesource.com/137016Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      f493e557
    • Katie Hockman's avatar
      compress: reduce copies of new text for compression testing · fdceb2a1
      Katie Hockman authored
      The previous book was 387 KiB decompressed and 119 KiB compressed, the
      new book is 567 KiB decompressed and 132 KiB compressed. Overall, this
      change will reduce the release binary size by 196 KiB. The new book will
      allow for slightly more extensive compression testing with a larger
      text.
      
      Command to run the benchmark tests used with benchstat:
      `../bin/go test -run='^$' -count=4 -bench=. compress/bzip2 compress/flate`
      
      When running the benchmarks locally, changed "Newton" to "Twain" and
      filtered the tests with the -bench flag to include only those which were
      relevant to these changes.
      
      benchstat results below:
      
      name                            old time/op    new time/op     delta
      DecodeTwain-8                     19.6ms ± 2%     24.1ms ± 1%  +23.04%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e4-8         140µs ± 3%      139µs ± 5%     ~     (p=0.886 n=4+4)
      Decode/Twain/Huffman/1e5-8        1.27ms ± 3%     1.26ms ± 1%     ~     (p=1.000 n=4+4)
      Decode/Twain/Huffman/1e6-8        12.4ms ± 0%     13.2ms ± 1%   +6.42%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e4-8           133µs ± 1%      123µs ± 1%   -7.35%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e5-8          1.20ms ± 0%     1.02ms ± 3%  -15.32%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e6-8          12.0ms ± 2%     10.1ms ± 3%  -15.89%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e4-8         131µs ± 6%      108µs ± 5%  -17.84%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e5-8        1.06ms ± 2%     0.80ms ± 1%  -24.97%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e6-8        10.0ms ± 3%      8.0ms ± 3%  -20.06%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e4-8     128µs ± 4%      115µs ± 4%   -9.70%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e5-8    1.04ms ± 2%     0.83ms ± 4%  -20.37%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e6-8    10.4ms ± 4%      8.1ms ± 5%  -22.25%  (p=0.029 n=4+4)
      Encode/Twain/Huffman/1e4-8        55.7µs ± 2%     55.6µs ± 1%     ~     (p=1.000 n=4+4)
      Encode/Twain/Huffman/1e5-8         441µs ± 0%      435µs ± 2%     ~     (p=0.343 n=4+4)
      Encode/Twain/Huffman/1e6-8        4.31ms ± 4%     4.30ms ± 4%     ~     (p=0.886 n=4+4)
      Encode/Twain/Speed/1e4-8           193µs ± 1%      166µs ± 2%  -14.09%  (p=0.029 n=4+4)
      Encode/Twain/Speed/1e5-8          1.54ms ± 1%     1.22ms ± 1%  -20.53%  (p=0.029 n=4+4)
      Encode/Twain/Speed/1e6-8          15.3ms ± 1%     12.2ms ± 3%  -20.62%  (p=0.029 n=4+4)
      Encode/Twain/Default/1e4-8         393µs ± 1%      390µs ± 1%     ~     (p=0.114 n=4+4)
      Encode/Twain/Default/1e5-8        6.12ms ± 4%     6.02ms ± 5%     ~     (p=0.486 n=4+4)
      Encode/Twain/Default/1e6-8        69.4ms ± 5%     59.0ms ± 4%  -15.07%  (p=0.029 n=4+4)
      Encode/Twain/Compression/1e4-8     423µs ± 2%      379µs ± 2%  -10.34%  (p=0.029 n=4+4)
      Encode/Twain/Compression/1e5-8    7.00ms ± 1%     7.88ms ± 3%  +12.49%  (p=0.029 n=4+4)
      Encode/Twain/Compression/1e6-8    76.6ms ± 5%     80.9ms ± 3%     ~     (p=0.114 n=4+4)
      
      name                            old speed      new speed       delta
      DecodeTwain-8                   19.8MB/s ± 2%   23.6MB/s ± 1%  +18.84%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e4-8      71.7MB/s ± 3%   72.1MB/s ± 6%     ~     (p=0.943 n=4+4)
      Decode/Twain/Huffman/1e5-8      78.8MB/s ± 3%   79.5MB/s ± 1%     ~     (p=1.000 n=4+4)
      Decode/Twain/Huffman/1e6-8      80.5MB/s ± 0%   75.6MB/s ± 1%   -6.03%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e4-8        75.2MB/s ± 1%   81.2MB/s ± 1%   +7.93%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e5-8        83.4MB/s ± 0%   98.6MB/s ± 3%  +18.16%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e6-8        83.6MB/s ± 2%   99.5MB/s ± 3%  +18.91%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e4-8      76.3MB/s ± 6%   92.8MB/s ± 4%  +21.62%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e5-8      94.4MB/s ± 3%  125.7MB/s ± 1%  +33.24%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e6-8       100MB/s ± 3%    125MB/s ± 3%  +25.12%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e4-8  78.4MB/s ± 4%   86.8MB/s ± 4%  +10.73%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e5-8  95.7MB/s ± 2%  120.3MB/s ± 4%  +25.65%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e6-8  96.4MB/s ± 4%  124.0MB/s ± 5%  +28.64%  (p=0.029 n=4+4)
      Encode/Twain/Huffman/1e4-8       179MB/s ± 2%    180MB/s ± 1%     ~     (p=1.000 n=4+4)
      Encode/Twain/Huffman/1e5-8       227MB/s ± 0%    230MB/s ± 2%     ~     (p=0.343 n=4+4)
      Encode/Twain/Huffman/1e6-8       232MB/s ± 4%    233MB/s ± 4%     ~     (p=0.886 n=4+4)
      Encode/Twain/Speed/1e4-8        51.8MB/s ± 1%   60.4MB/s ± 2%  +16.43%  (p=0.029 n=4+4)
      Encode/Twain/Speed/1e5-8        65.1MB/s ± 1%   81.9MB/s ± 1%  +25.83%  (p=0.029 n=4+4)
      Encode/Twain/Speed/1e6-8        65.2MB/s ± 1%   82.2MB/s ± 3%  +26.00%  (p=0.029 n=4+4)
      Encode/Twain/Default/1e4-8      25.4MB/s ± 1%   25.6MB/s ± 1%     ~     (p=0.114 n=4+4)
      Encode/Twain/Default/1e5-8      16.4MB/s ± 4%   16.6MB/s ± 5%     ~     (p=0.486 n=4+4)
      Encode/Twain/Default/1e6-8      14.4MB/s ± 6%   17.0MB/s ± 4%  +17.67%  (p=0.029 n=4+4)
      Encode/Twain/Compression/1e4-8  23.6MB/s ± 2%   26.4MB/s ± 2%  +11.54%  (p=0.029 n=4+4)
      Encode/Twain/Compression/1e5-8  14.3MB/s ± 1%   12.7MB/s ± 3%  -11.08%  (p=0.029 n=4+4)
      Encode/Twain/Compression/1e6-8  13.1MB/s ± 4%   12.4MB/s ± 3%     ~     (p=0.114 n=4+4)
      
      name                            old alloc/op   new alloc/op    delta
      DecodeTwain-8                     3.63MB ± 0%     3.63MB ± 0%   +0.15%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e4-8        42.0kB ± 0%     41.3kB ± 0%   -1.62%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e5-8        43.5kB ± 0%     45.1kB ± 0%   +3.74%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e6-8        71.7kB ± 0%     80.0kB ± 0%  +11.55%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e4-8          41.2kB ± 0%     41.3kB ± 0%     ~     (p=0.286 n=4+4)
      Decode/Twain/Speed/1e5-8          45.1kB ± 0%     43.9kB ± 0%   -2.80%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e6-8          72.8kB ± 0%     81.3kB ± 0%  +11.72%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e4-8        41.2kB ± 0%     41.2kB ± 0%   -0.22%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e5-8        44.4kB ± 0%     43.0kB ± 0%   -3.02%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e6-8        71.0kB ± 0%     61.8kB ± 0%  -13.00%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e4-8    41.3kB ± 0%     41.2kB ± 0%   -0.29%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e5-8    43.3kB ± 0%     43.0kB ± 0%   -0.72%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e6-8    69.1kB ± 0%     63.7kB ± 0%   -7.90%  (p=0.029 n=4+4)
      
      name                            old allocs/op  new allocs/op   delta
      DecodeTwain-8                       51.0 ± 0%       51.2 ± 1%     ~     (p=1.000 n=4+4)
      Decode/Twain/Huffman/1e4-8          15.0 ± 0%       14.0 ± 0%   -6.67%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e5-8          20.0 ± 0%       23.0 ± 0%  +15.00%  (p=0.029 n=4+4)
      Decode/Twain/Huffman/1e6-8           134 ± 0%        161 ± 0%  +20.15%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e4-8            17.0 ± 0%       18.0 ± 0%   +5.88%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e5-8            30.0 ± 0%       31.0 ± 0%   +3.33%  (p=0.029 n=4+4)
      Decode/Twain/Speed/1e6-8             193 ± 0%        228 ± 0%  +18.13%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e4-8          17.0 ± 0%       15.0 ± 0%  -11.76%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e5-8          28.0 ± 0%       32.0 ± 0%  +14.29%  (p=0.029 n=4+4)
      Decode/Twain/Default/1e6-8           199 ± 0%        158 ± 0%  -20.60%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e4-8      17.0 ± 0%       15.0 ± 0%  -11.76%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e5-8      28.0 ± 0%       32.0 ± 0%  +14.29%  (p=0.029 n=4+4)
      Decode/Twain/Compression/1e6-8       196 ± 0%        150 ± 0%  -23.47%  (p=0.029 n=4+4)
      
      Updates #27151
      
      Change-Id: I6c439694ed16a33bb4c63fbfb8570c7de46b4f2d
      Reviewed-on: https://go-review.googlesource.com/135495Reviewed-by: 's avatarDmitri Shuralyov <dmitshur@golang.org>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      fdceb2a1
    • Brad Fitzpatrick's avatar
      net: don't reject domain names with only numbers and hyphens · 5b3aafe2
      Brad Fitzpatrick authored
      From https://github.com/golang/go/issues/17659#issuecomment-423113606 ...
      
      > In kubernetes , isDomainName reject Pods "A Record" "pod-ip-address",
      > for example: "172-17-0-16", as RFC 3696 section 2 requires
      > "top-level domain names not be all-numeric", but this example has
      > three hyphen, so I think it should not be reject.
      
      Updates #17659
      
      Change-Id: Ibd8ffb9473d69c45c91525953c09c6749233ca20
      Reviewed-on: https://go-review.googlesource.com/136900
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarIan Gudger <igudger@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5b3aafe2
    • Ian Davis's avatar
      image: add benchmarks for At and Set methods · 4039be00
      Ian Davis authored
      Added in preparation for looking at some optimizations around bounds
      checks.
      
      BenchmarkAt/rgba-8            100000000     18.5 ns/op      4 B/op   1 allocs/op
      BenchmarkAt/rgba64-8          100000000     22.9 ns/op      8 B/op   1 allocs/op
      BenchmarkAt/nrgba-8           100000000     18.8 ns/op      4 B/op   1 allocs/op
      BenchmarkAt/nrgba64-8         100000000     22.1 ns/op      8 B/op   1 allocs/op
      BenchmarkAt/alpha-8           100000000     14.6 ns/op      1 B/op   1 allocs/op
      BenchmarkAt/alpha16-8         200000000     6.46 ns/op      0 B/op   0 allocs/op
      BenchmarkAt/gray-8            100000000     14.3 ns/op      1 B/op   1 allocs/op
      BenchmarkAt/gray16-8          200000000     6.45 ns/op      0 B/op   0 allocs/op
      BenchmarkAt/paletted-8        300000000     4.28 ns/op      0 B/op   0 allocs/op
      BenchmarkSet/rgba-8           50000000      39.2 ns/op      8 B/op   2 allocs/op
      BenchmarkSet/rgba64-8         30000000      45.8 ns/op     16 B/op   2 allocs/op
      BenchmarkSet/nrgba-8          50000000      39.3 ns/op      8 B/op   2 allocs/op
      BenchmarkSet/nrgba64-8        30000000      45.6 ns/op     16 B/op   2 allocs/op
      BenchmarkSet/alpha-8          50000000      34.5 ns/op      2 B/op   2 allocs/op
      BenchmarkSet/alpha16-8        50000000      34.9 ns/op      4 B/op   2 allocs/op
      BenchmarkSet/gray-8           100000000     20.3 ns/op      1 B/op   1 allocs/op
      BenchmarkSet/gray16-8         50000000      36.2 ns/op      4 B/op   2 allocs/op
      BenchmarkSet/paletted-8       50000000      39.5 ns/op      1 B/op   1 allocs/op
      BenchmarkRGBAAt-8             500000000     3.74 ns/op
      BenchmarkRGBASetRGBA-8        300000000     4.33 ns/op
      BenchmarkRGBA64At-8           300000000     5.06 ns/op
      BenchmarkRGBA64SetRGBA64-8    200000000     6.61 ns/op
      BenchmarkNRGBAAt-8            500000000     3.69 ns/op
      BenchmarkNRGBASetNRGBA-8      300000000     4.06 ns/op
      BenchmarkNRGBA64At-8          300000000     4.98 ns/op
      BenchmarkNRGBA64SetNRGBA64-8  200000000     6.62 ns/op
      BenchmarkAlphaAt-8            2000000000    1.43 ns/op
      BenchmarkAlphaSetAlpha-8      2000000000    1.55 ns/op
      BenchmarkAlpha16At-8          1000000000    2.87 ns/op
      BenchmarkAlphaSetAlpha16-8    500000000     3.27 ns/op
      BenchmarkGrayAt-8             2000000000    1.43 ns/op
      BenchmarkGraySetGray-8        2000000000    1.55 ns/op
      BenchmarkGray16At-8           1000000000    2.87 ns/op
      BenchmarkGraySetGray16-8      500000000     3.14 ns/op
      
      Updates #14884
      
      Change-Id: I349fb214ee75f13ecbc62ac22a40e3b337648f60
      Reviewed-on: https://go-review.googlesource.com/136796Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      4039be00
    • Keith Randall's avatar
      cmd/compile: fix precedence order bug · 9774fa6f
      Keith Randall authored
      &^ and << have equal precedence.  Add some parentheses to make sure
      we shift before we andnot.
      
      Fixes #27829
      
      Change-Id: Iba8576201f0f7c52bf9795aaa75d15d8f9a76811
      Reviewed-on: https://go-review.googlesource.com/136899Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      9774fa6f
    • Andrei Tudor Călin's avatar
      net: don't use splice for unix{packet,gram} connections · 8d6a455d
      Andrei Tudor Călin authored
      As pointed out in the aftermath of CL 113997, splice is not supported
      for SOCK_SEQPACKET or SOCK_DGRAM unix sockets. Don't call poll.Splice
      in those cases.
      
      Change-Id: Ieab18fb0ae706fdeb249e3f54d51a3292e3ead62
      Reviewed-on: https://go-review.googlesource.com/136635
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      8d6a455d
    • Jongmin Kim's avatar
      test/bench/garbage: update Benchmarks Game URL to new page · c22c7607
      Jongmin Kim authored
      The existing URL in comment points to an Alioth page which was
      deprecated (and not working), so use the new Benchmarks Game URL.
      
      Change-Id: Ifd694382a44a24c44acbed3fe1b17bca6dab998f
      Reviewed-on: https://go-review.googlesource.com/136835Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      c22c7607
    • Elias Naur's avatar
      syscall: replace lstat, lchown, stat to please Android O · f25656d3
      Elias Naur authored
      Implement Lstat with fstatat and Lchown with Fchownat on
      linux/amd64, linux/arm and linux/386. Furthermore, implement Stat
      with fstatat on linux/arm and linux/386. Linux/arm64 already had
      similar replacements.
      
      The fstatat and fchownat system calls were added in kernel 2.6.16,
      which is before the Go minimum, 2.6.23.
      
      The three syscalls then match the android bionic implementation
      and avoids the Android O seccomp filter.
      
      Fixes #27797
      
      Change-Id: I07fd5506955d454a1a660fef5af0e1ac1ecb0959
      Reviewed-on: https://go-review.googlesource.com/136795
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      f25656d3
    • Alberto Donizetti's avatar
      test: fix bcecheck test on noopt builder · 6054fef1
      Alberto Donizetti authored
      The noopt builder is configured by setting GO_GCFLAGS=-N -l, but the
      test/run.go test harness doesn't look at GO_GCFLAGS when processing
      "errorcheck" files, it just calls compile:
      
        cmdline := []string{goTool(), "tool", "compile", /* etc */}
      
      This is working as intended, since it makes the tests more robust and
      independent from the environment; errorcheck files are supposed to set
      additional building flags, when needed, like in:
      
        // errorcheck -0 -N -l
      
      The test/bcecheck.go test used to work on the noopt builder (even if
      bce is not active on -N -l) because the test was auto-contained and
      the file always compiled with optimizations enabled.
      
      In CL 107355, a new bce test dependent on an external package
      (encoding.binary) was added. On the noopt builder the external package
      is built using -N -l, and this causes a test failure that broke the
      noopt builder:
      
        https://build.golang.org/log/b2be319536285e5807ee9d66d6d0ec4d57433768
      
      To reproduce the failure, one can do:
      
        $ go install -a -gcflags="-N -l" std
        $ go run run.go -- checkbce.go
      
      This change fixes the noopt builder breakage by removing the bce test
      dependency on encoding/binary by defining a local Uint64() function to
      be used in the test.
      
      Change-Id: Ife71aab662001442e715c32a0b7d758349a63ff1
      Reviewed-on: https://go-review.googlesource.com/136855Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      6054fef1
    • Eugene Kalinin's avatar
      mime: derestrict value backslash unescaping for all encodings · 3ff28f7d
      Eugene Kalinin authored
      Previously consumeValue performed consumption of "unnecessary backslashes"
      strictly for non-ASCII and non-token runes. Thus if it encountered a
      backslash before a rune that is out of the ASCII range, it would
      erroneously skip that backslash. This change now derestricts
      "unnecessary backslash" unescaping for all character encodings,
      using "isTSpecial" instead of "!isTokenChar".
      This change is a follow-up of CL 32175.
      
      Fixes #25888
      
      Change-Id: I5e02bbf9c42f753a6eb31399b8d20315af991490
      Reviewed-on: https://go-review.googlesource.com/119795Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      3ff28f7d
  4. 23 Sep, 2018 2 commits
  5. 20 Sep, 2018 3 commits