1. 21 7月, 2015 4 次提交
  2. 20 7月, 2015 21 次提交
    • B
      Auto merge of #27025 - dotdash:issue-26484, r=pnkfelix · 39d4faf9
      bors 提交于
      See the commits for details
      
      r? @arielb1 
      39d4faf9
    • B
      Create proper debuginfo for closure variables · 3d65c7ff
      Björn Steinbrink 提交于
      Variables for closures hold a tuple of captured variables, and not the
      function itself.
      
      Fixes #26484
      3d65c7ff
    • B
      Auto merge of #26887 - andreastt:blur_help_dialogue, r=steveklabnik · 4e51763e
      bors 提交于
      Blurs the document's background when the help dialogue is present,
      making the contents of the dialogue stand out more.
      4e51763e
    • A
      librustdoc: blur page when help dialogue is present · 6b648264
      Andreas Tolfsen 提交于
      Blurs the document's background when the help dialogue is present,
      making the contents of the dialogue stand out more.
      6b648264
    • B
      Auto merge of #27118 - apasel422:issue-20825, r=alexcrichton · 32a12c8d
      bors 提交于
      closes #20825
      32a12c8d
    • S
      0ca8e499
    • B
      Auto merge of #27044 - nrc:graphviz-style, r=@pnkfelix · 6c88aeda
      bors 提交于
      r? @pnkfelix 
      6c88aeda
    • B
      Auto merge of #27038 - ktossell:narrow_doc_ip_ranges, r=alexcrichton · 5e3b756f
      bors 提交于
      Ipv4Addr::is_documentation() matches 513 /24 blocks when it should only match 3.
      5e3b756f
    • N
      graphviz: support style attributes · 75f8f966
      Nick Cameron 提交于
      75f8f966
    • B
      Auto merge of #27132 - apasel422:issue-23491, r=arielb1 · c70417bd
      bors 提交于
      closes #23491
      c70417bd
    • B
      Auto merge of #27120 - apasel422:associated-item-error, r=arielb1 · ef04b072
      bors 提交于
      Previously, these would both be labeled as methods.
      ef04b072
    • B
      Auto merge of #27065 - marcusklaas:loop-label, r=nrc · be23d44a
      bors 提交于
      This closes https://github.com/rust-lang/rust/issues/27042.
      
      I'd love to know if there's a way to make a regression test for this!
      be23d44a
    • B
      Auto merge of #27133 - apasel422:issue-15919, r=rollup · 5d304134
      bors 提交于
      closes #15919
      5d304134
    • A
      clean-up find_bound_for_assoc_item · 28ce509d
      Ariel Ben-Yehuda 提交于
      28ce509d
    • A
      return erased regions from fulfill_obligation · 8edcff59
      Ariel Ben-Yehuda 提交于
      Fixes #26802.
      8edcff59
    • A
      implement 'a:'static region bounds · 34309cdf
      Ariel Ben-Yehuda 提交于
      Fixes #22863.
      34309cdf
    • A
      add test for #15919 · 60734a65
      Andrew Paseltiner 提交于
      closes #15919
      60734a65
    • A
      add test for #23491 · 05e2f866
      Andrew Paseltiner 提交于
      closes #23491
      05e2f866
    • A
      add separate errors for out-of-place associated consts and types · ce856a55
      Andrew Paseltiner 提交于
      Previously, these would both be labeled as methods.
      ce856a55
    • B
      Auto merge of #27110 - arthurprs:optintstr, r=Gankro · a41178e8
      bors 提交于
      I wrote a reasonably optimized version for both functions. Further optimizations are possible but I tried to keep the code size small (which I think is important), it's a road of diminished gains.
      
      The repository used for testing/benchmarks is https://github.com/arthurprs/rust-optimized-inttostr
      
      Benchmarks are ran for 3 different distributions, bellow are string length histograms for the u32 type
      
      * _h (big numbers skew)
      [0, 0, 5, 29, 103, 212, 551, 1138, 1887, 3196, 2879]
      * _m (slight small number skew):
      [0, 2807, 1334, 1057, 905, 821, 772, 707, 627, 605, 365]
      * _l (small numbers skew):
      [0, 8004, 567, 351, 248, 212, 170, 126, 136, 112, 74]
      
      Tested processors are
      * x64 laptop (i7-2670QM)
      * x32 server (Digital Ocean E5-2630L-v2)
      
      ### Display
      
      It uses a small look up table (200 bytes) and decode up to 4 characters at a time. I also took special precautions to reduce 64bit arithmetic on 32bit architectures and the gains are huge in these cases.
      
      Overall, on modern 64bit CPUs it's pretty much the same speed as the stdlib implementation for very small numbers (0..99), but pulls ahead as the length of the decimal increases. On slight older CPUs (w/ worse ALUs) or 32bit architectures it's pretty much always faster.
      
      x64 benchmarks
      ```
      test bench::display_h_new_u08     ... bench:      71,041 ns/iter (+/- 2,894)
      test bench::display_h_new_u16     ... bench:     378,255 ns/iter (+/- 36,547)
      test bench::display_h_new_u32     ... bench:   4,232,483 ns/iter (+/- 509,661)
      test bench::display_h_new_u64     ... bench:   5,166,740 ns/iter (+/- 421,124)
      test bench::display_h_stdlib_u08  ... bench:      73,536 ns/iter (+/- 5,287)
      test bench::display_h_stdlib_u16  ... bench:     451,443 ns/iter (+/- 16,879)
      test bench::display_h_stdlib_u32  ... bench:   5,551,070 ns/iter (+/- 518,151)
      test bench::display_h_stdlib_u64  ... bench:   8,624,374 ns/iter (+/- 643,701)
      test bench::display_l_new_u08     ... bench:      71,547 ns/iter (+/- 504)
      test bench::display_l_new_u16     ... bench:     399,727 ns/iter (+/- 28,030)
      test bench::display_l_new_u32     ... bench:   4,365,303 ns/iter (+/- 414,414)
      test bench::display_l_new_u64     ... bench:   5,302,382 ns/iter (+/- 292,324)
      test bench::display_l_stdlib_u08  ... bench:      75,445 ns/iter (+/- 2,487)
      test bench::display_l_stdlib_u16  ... bench:     444,313 ns/iter (+/- 16,203)
      test bench::display_l_stdlib_u32  ... bench:   5,761,801 ns/iter (+/- 387,186)
      test bench::display_l_stdlib_u64  ... bench:   8,790,365 ns/iter (+/- 614,846)
      test bench::display_m_new_u08     ... bench:      71,820 ns/iter (+/- 2,956)
      test bench::display_m_new_u16     ... bench:     399,649 ns/iter (+/- 20,643)
      test bench::display_m_new_u32     ... bench:   4,355,561 ns/iter (+/- 179,189)
      test bench::display_m_new_u64     ... bench:   5,070,594 ns/iter (+/- 341,950)
      test bench::display_m_stdlib_u08  ... bench:      74,900 ns/iter (+/- 1,909)
      test bench::display_m_stdlib_u16  ... bench:     448,788 ns/iter (+/- 20,791)
      test bench::display_m_stdlib_u32  ... bench:   5,717,939 ns/iter (+/- 316,824)
      test bench::display_m_stdlib_u64  ... bench:   8,787,160 ns/iter (+/- 482,864)
      ```
      
      x86 benchmarks
      ```
      test bench::display_h_new_u08     ... bench:      94,246 ns/iter (+/- 34,872)
      test bench::display_h_new_u16     ... bench:     533,805 ns/iter (+/- 22,499)
      test bench::display_h_new_u32     ... bench:   6,127,747 ns/iter (+/- 2,192,789)
      test bench::display_h_new_u64     ... bench:  14,994,203 ns/iter (+/- 1,609,345)
      test bench::display_h_stdlib_u08  ... bench:     107,233 ns/iter (+/- 8,571)
      test bench::display_h_stdlib_u16  ... bench:     631,186 ns/iter (+/- 11,332)
      test bench::display_h_stdlib_u32  ... bench:   7,696,344 ns/iter (+/- 957,917)
      test bench::display_h_stdlib_u64  ... bench:  45,677,401 ns/iter (+/- 4,991,344)
      test bench::display_l_new_u08     ... bench:      95,855 ns/iter (+/- 27,735)
      test bench::display_l_new_u16     ... bench:     532,084 ns/iter (+/- 40,479)
      test bench::display_l_new_u32     ... bench:   5,973,953 ns/iter (+/- 211,676)
      test bench::display_l_new_u64     ... bench:  14,773,064 ns/iter (+/- 1,276,579)
      test bench::display_l_stdlib_u08  ... bench:     106,350 ns/iter (+/- 63,963)
      test bench::display_l_stdlib_u16  ... bench:     637,746 ns/iter (+/- 101,005)
      test bench::display_l_stdlib_u32  ... bench:   7,740,640 ns/iter (+/- 848,478)
      test bench::display_l_stdlib_u64  ... bench:  44,846,932 ns/iter (+/- 4,514,694)
      test bench::display_m_new_u08     ... bench:      94,549 ns/iter (+/- 13,029)
      test bench::display_m_new_u16     ... bench:     546,030 ns/iter (+/- 35,804)
      test bench::display_m_new_u32     ... bench:   5,983,924 ns/iter (+/- 1,180,559)
      test bench::display_m_new_u64     ... bench:  14,817,873 ns/iter (+/- 2,271,464)
      test bench::display_m_stdlib_u08  ... bench:     107,806 ns/iter (+/- 8,805)
      test bench::display_m_stdlib_u16  ... bench:     630,714 ns/iter (+/- 6,586)
      test bench::display_m_stdlib_u32  ... bench:   7,784,210 ns/iter (+/- 358,601)
      test bench::display_m_stdlib_u64  ... bench:  46,223,927 ns/iter (+/- 6,553,176)
      ```
      
      ### from_str_radix (FromStr)
      
      All valid digits are ascii so I modified the function to use the underlining bytes instead and simplified the match to avoid wasting cycles.
      
      x64 benchmarks
      ```
      test bench::from_str_h_new_u08    ... bench:      28,153 ns/iter (+/- 624)
      test bench::from_str_h_new_u16    ... bench:     223,513 ns/iter (+/- 11,554)
      test bench::from_str_h_new_u32    ... bench:   3,098,935 ns/iter (+/- 231,022)
      test bench::from_str_h_new_u64    ... bench:   5,009,900 ns/iter (+/- 341,961)
      test bench::from_str_h_stdlib_u08 ... bench:      34,033 ns/iter (+/- 2,068)
      test bench::from_str_h_stdlib_u16 ... bench:     248,785 ns/iter (+/- 14,208)
      test bench::from_str_h_stdlib_u32 ... bench:   4,150,536 ns/iter (+/- 266,070)
      test bench::from_str_h_stdlib_u64 ... bench:   6,817,997 ns/iter (+/- 449,838)
      test bench::from_str_l_new_u08    ... bench:      27,552 ns/iter (+/- 1,500)
      test bench::from_str_l_new_u16    ... bench:     234,360 ns/iter (+/- 13,144)
      test bench::from_str_l_new_u32    ... bench:   3,140,261 ns/iter (+/- 248,175)
      test bench::from_str_l_new_u64    ... bench:   5,176,583 ns/iter (+/- 350,416)
      test bench::from_str_l_stdlib_u08 ... bench:      35,060 ns/iter (+/- 2,154)
      test bench::from_str_l_stdlib_u16 ... bench:     252,135 ns/iter (+/- 23,461)
      test bench::from_str_l_stdlib_u32 ... bench:   4,154,599 ns/iter (+/- 369,606)
      test bench::from_str_l_stdlib_u64 ... bench:   6,892,767 ns/iter (+/- 213,030)
      test bench::from_str_m_new_u08    ... bench:      28,252 ns/iter (+/- 1,384)
      test bench::from_str_m_new_u16    ... bench:     231,051 ns/iter (+/- 16,540)
      test bench::from_str_m_new_u32    ... bench:   3,166,504 ns/iter (+/- 134,418)
      test bench::from_str_m_new_u64    ... bench:   5,103,195 ns/iter (+/- 218,912)
      test bench::from_str_m_stdlib_u08 ... bench:      35,012 ns/iter (+/- 2,735)
      test bench::from_str_m_stdlib_u16 ... bench:     250,967 ns/iter (+/- 14,708)
      test bench::from_str_m_stdlib_u32 ... bench:   4,101,845 ns/iter (+/- 205,802)
      test bench::from_str_m_stdlib_u64 ... bench:   6,823,001 ns/iter (+/- 267,215)
      ```
      
      x86 benchmarks
      ```
      test bench::from_str_h_new_u08    ... bench:      23,682 ns/iter (+/- 3,590)
      test bench::from_str_h_new_u16    ... bench:     190,916 ns/iter (+/- 29,688)
      test bench::from_str_h_new_u32    ... bench:   2,649,952 ns/iter (+/- 308,576)
      test bench::from_str_h_new_u64    ... bench:  23,458,434 ns/iter (+/- 2,327,427)
      test bench::from_str_h_stdlib_u08 ... bench:      45,551 ns/iter (+/- 6,968)
      test bench::from_str_h_stdlib_u16 ... bench:     313,739 ns/iter (+/- 17,175)
      test bench::from_str_h_stdlib_u32 ... bench:   4,615,669 ns/iter (+/- 470,766)
      test bench::from_str_h_stdlib_u64 ... bench:  30,589,482 ns/iter (+/- 2,278,996)
      test bench::from_str_l_new_u08    ... bench:      23,763 ns/iter (+/- 5,545)
      test bench::from_str_l_new_u16    ... bench:     185,472 ns/iter (+/- 33,097)
      test bench::from_str_l_new_u32    ... bench:   2,691,307 ns/iter (+/- 473,886)
      test bench::from_str_l_new_u64    ... bench:  22,952,593 ns/iter (+/- 1,963,742)
      test bench::from_str_l_stdlib_u08 ... bench:      45,285 ns/iter (+/- 16,337)
      test bench::from_str_l_stdlib_u16 ... bench:     313,624 ns/iter (+/- 6,643)
      test bench::from_str_l_stdlib_u32 ... bench:   4,595,679 ns/iter (+/- 1,876,361)
      test bench::from_str_l_stdlib_u64 ... bench:  30,434,683 ns/iter (+/- 1,901,996)
      test bench::from_str_m_new_u08    ... bench:      23,812 ns/iter (+/- 1,505)
      test bench::from_str_m_new_u16    ... bench:     185,553 ns/iter (+/- 19,788)
      test bench::from_str_m_new_u32    ... bench:   2,614,920 ns/iter (+/- 66,230)
      test bench::from_str_m_new_u64    ... bench:  23,241,778 ns/iter (+/- 3,474,077)
      test bench::from_str_m_stdlib_u08 ... bench:      45,634 ns/iter (+/- 1,436)
      test bench::from_str_m_stdlib_u16 ... bench:     316,479 ns/iter (+/- 21,212)
      test bench::from_str_m_stdlib_u32 ... bench:   4,609,147 ns/iter (+/- 487,068)
      test bench::from_str_m_stdlib_u64 ... bench:  30,165,173 ns/iter (+/- 1,601,830)
      ```
      a41178e8
    • B
      Auto merge of #27100 - tshepang:better-names, r=Gankro · 58fb9b5c
      bors 提交于
      58fb9b5c
  3. 19 7月, 2015 15 次提交