[#100309] How to use backport custom field — Jun Aruga <jaruga@...>
Please allow my ignorance.
9 messages
2020/10/06
[#100310] Re: How to use backport custom field
— "NARUSE, Yui" <naruse@...>
2020/10/06
IkJhY2twb3J0IGN1c3RvbSBmaWVsZCIgaXMgb25seSBhdmFpbGFibGUgZm9yIHRpY2tldHMgd2hv
[#100311] Re: How to use backport custom field
— Jun Aruga <jaruga@...>
2020/10/06
On Tue, Oct 6, 2020 at 4:44 PM NARUSE, Yui <[email protected]> wrote:
[#100314] Re: How to use backport custom field
— "NARUSE, Yui" <naruse@...>
2020/10/06
VGhhbmsgeW91IGZvciBjb25maXJtYXRpb24uCkkgY2hlY2tlZCBhZ2FpbiBhbmQgdG8gZWRpdCBi
[#100322] Re: How to use backport custom field
— Jun Aruga <jaruga@...>
2020/10/07
On Tue, Oct 6, 2020 at 7:25 PM NARUSE, Yui <[email protected]> wrote:
[#100326] Re: How to use backport custom field
— "NARUSE, Yui" <naruse@...>
2020/10/07
SSBhZGRlZCB5b3UgdG8gIlJlcG9ydGVyIiByb2xlIGluIHRoZSBwcm9qZWN0CgoyMDIw5bm0MTDm
[#100327] Re: How to use backport custom field
— Jun Aruga <jaruga@...>
2020/10/07
On Wed, Oct 7, 2020 at 1:42 PM NARUSE, Yui <[email protected]> wrote:
[ruby-core:100319] [Ruby master Feature#17219] Make URI#hostname 18-20% and hostname= 31-156% faster
From:
lukas@...
Date:
2020-10-07 08:38:55 UTC
List:
ruby-core #100319
Issue #17219 has been updated by lzap (Lukas Zapletal).
File 3635.patch added
Attaching patch. Also available as https://github.com/ruby/ruby/pull/3635
----------------------------------------
Feature #17219: Make URI#hostname 18-20% and hostname=3D 31-156% faster
https://bugs.ruby-lang.org/issues/17219#change-87900
* Author: lzap (Lukas Zapletal)
* Status: Open
* Priority: Normal
----------------------------------------
Hello,
URI#hostname extends URI#host with IPv6 support. In URI, IPv6 address must =
have square brackets (e.g. `http://[2001:db8::1]`), URI#hostname strips the=
se characters out while URI#hostname=3D adds them if missing. There are thr=
ee regular expressions to perform these tasks which can dramatically slow d=
own performance. I am attaching a two-line patch and here is a benchmark: h=
ttps://gist.github.com/lzap/24cbecb47daf29111350e41a24250922
```
Calculating -------------------------------------
hostname on an ipv6 (orig)
4.018M (=B1 0.4%) i/s - 20.175M in 5.021128s
hostname on an ipv6 (new)
4.753M (=B1 0.5%) i/s - 23.930M in 5.034444s
Comparison:
hostname on an ipv6 (new): 4753483.7 i/s
hostname on an ipv6 (orig): 4018053.7 i/s - 1.18x (=B1 0.00) slower
Calculating -------------------------------------
hostname on an ipv4 (orig)
4.145M (=B1 0.8%) i/s - 21.031M in 5.073638s
hostname on an ipv4 (new)
4.960M (=B1 0.6%) i/s - 25.142M in 5.069027s
Comparison:
hostname on an ipv4 (new): 4960111.9 i/s
hostname on an ipv4 (orig): 4145365.6 i/s - 1.20x (=B1 0.00) slower
Calculating -------------------------------------
hostname on an host (orig)
4.183M (=B1 0.4%) i/s - 20.984M in 5.016865s
hostname on an host (new)
4.976M (=B1 0.7%) i/s - 25.213M in 5.066627s
Comparison:
hostname on an host (new): 4976454.5 i/s
hostname on an host (orig): 4182840.9 i/s - 1.19x (=B1 0.00) slower
Calculating -------------------------------------
hostname=3D on an ipv6 (orig)
958.023k (=B1 1.1%) i/s - 4.798M in 5.008884s
hostname=3D on an ipv6 (new)
1.252M (=B1 1.2%) i/s - 6.337M in 5.063109s
Comparison:
hostname=3D on an ipv6 (new): 1251868.4 i/s
hostname=3D on an ipv6 (orig): 958023.5 i/s - 1.31x (=B1 0.00) slower
Calculating -------------------------------------
hostname=3D on an ipv4 (orig)
2.246M (=B1 1.0%) i/s - 11.392M in 5.073679s
hostname=3D on an ipv4 (new)
5.739M (=B1 0.3%) i/s - 29.246M in 5.095776s
Comparison:
hostname=3D on an ipv4 (new): 5739237.9 i/s
hostname=3D on an ipv4 (orig): 2245518.7 i/s - 2.56x (=B1 0.00) slower
Calculating -------------------------------------
hostname=3D on an host (orig)
2.266M (=B1 0.7%) i/s - 11.504M in 5.076980s
hostname=3D on an host (new)
5.795M (=B1 0.5%) i/s - 29.263M in 5.049941s
Comparison:
hostname=3D on an host (new): 5794820.2 i/s
hostname=3D on an host (orig): 2266068.9 i/s - 2.56x (=B1 0.00) slower
```
A patch and a PR incoming.
---Files--------------------------------
3635.patch (974 Bytes)
-- =
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>