逆に言うと、Rubyの文字列型の内部実装がropeになれば、freezeしてもしなくても変わらない速度が出るようになって、結局freezeする必要なんてなかったんやーで丸く収まるんじゃないの?と思いました #雑な感想
— Kazuho Oku (@kazuho) October 6, 2015
とツイートしたところ、処理系の中の人から@kazuho 文字列を弄る話じゃなくて、文字列の identity の話なので、ちょっと関係ないかなぁ、と
— _ko1 (@_ko1) October 6, 2015
みたいなツッコミをもらって、うっすみません…ってなってRuby VMのコードを読むことになったわけです。で、まあ、いくつか気になる点があったので手をつけてしまいました。
1. オブジェクト生成のホットパスの最適化
ホットスポットだとされていたところのコードを読んでると、オブジェクト生成の際に走る関数が割と深いのが問題っぽかった。通常実行されるパスは短いから、それにあわせて最適なコードがはかれるようにコードを調整すれば速くなるはず!!!
とコンセプトコードを書いて投げたら取り込まれた。やったね!!!
と思ったら、ほとんど速くなってないっぽい。これは悲しい…ということで、細かな修正を依頼。
このPR適用すると、問題のマイクロベンチマークが3%〜5%くらい速くなるっぽい。
2. ヒープページのソートをやめる
通常実行される側をいじっても期待ほど速度が上がらなかったので、これは遅い側に原因があるかも…って見ていて気になったのが、ヒープページをソートする処理。現状のRubyは、オブジェクトを格納する「ヒープページ」を16KB単位で確保するんだけど、これを逆参照できるように、アドレスでソートした一覧を持ってる。この構築コストがでかい。
で、これをヒープに書き直してみたところ、rdocを使ったベンチマークで2〜3%の高速化が確認できたので報告。
.@_ko1 気になったので、heap tableを雑にハッシュ化してみましたが、rdocで2〜3%実行時間が減ります(高速化します)ね https://t.co/CJhierZZN3
— Kazuho Oku (@kazuho) October 7, 2015
ただ、今日のRubyは、(昔読んだ記事とは異なり)ヒープページが16KB単位でアラインされているということなので、ヒープを使うよりもビットマップを使うべき案件。
3. スイープの最適化
ヒープページのソートを書き直したあとでプロファイラの出力を眺めていたら、GCのスイープ処理が重たいことに気づいた。コードを読んだところ、分岐回数と呼出深度の両面で改善が望めそうだったので、ざっくりやったところ、やはり2〜5%程度実行時間の短縮ができた。ので、これはPRとして報告。
この3つを組み合わせると、rdocみたいな実アプリケーションの実行時間が、手元で5%以上縮みそう!注1 ってことで満足したのがここ二日間の進捗です!!!!!!! なんかいろいろ滞っているような気がしますがすみああおえtぬさおえうh
これからは雑なツイートを慎みたいと思います。
注1: バグがなければ!!
This is great do you have a catologue if so I would love one to share with friends and family.
ReplyDeleteWorldcup 2016 live Score Streaming Watch Online
T20 cricket wc 2016 schedule time table
icc t20 world cup
ReplyDeleteicc t20 world cup 2016
icc t20 world cup 2016 live
icc t20 world cup 2016 live streaming
icc t20 world cup live
t20 world 2016
t20 world cup
t20 world cup 2016 live
t20 world cup 2016 live streaming
t20 world cup live
icc t20 world cup
icc t20 world cup 2016
icc t20 world cup 2016 live
icc t20 world cup 2016 live streaming
icc t20 world cup live
t20 world 2016
t20 world cup
t20 world cup 2016 live
t20 world cup 2016 live streaming
t20 world cup live
IPL t20
IPL t20 2016
IPL t20 2016 live
IPL t20 2016 Streaming
IPL t20 2016 live Streaming
IPL t20 2016 Streaming
IPL t20 live Streaming
IPL live Streaming
IPL live
IPL t20 live
mobiles phone
hindilyrics
PnrStatus
Champions Trophy 2017 Teams Schedule. Get Australia, England, Pakistan, UAE, Afghanistan,
ReplyDeleteIndia Champions Trophy Team Squadl, South Africa, Bangladesh and Afghanistan
Champions Trophy 2017 Live Streaming in India. Star Sports official TV Channel Rights for the India vs England. Watch live Streaming,
ReplyDeleteCoach Outlet ED Hardy Outlet Coach Outlet Store Online Kate Spade Outlet Cheap Jordans Coach Purses Coach Outlet Kate Spade Outlet Toms Outlet Louis Vuitton
ReplyDeleteشركة نقل عفش بالدمام الشرق الاوسط متحصصه فى نقل عفش واثاث بالدمام ونقل العفش بالخبر كما انها توفر شركة نقل عفش بالجبيل والخبر وشركة نقل عفش بالقطيف والاحساء وجميع خدمات نقل العفش والاثاث بالمنطقة الشرقية بارخص اسعار نقل عفش بالدمام وتقدم ايضا شركة تخزين عفش بالدمام والخبر
ReplyDeleteنقل عفش بالدمام
شركة نقل اثاث بالدمام
شركة نقل اثاث بالخبر
شركة نقل اثاث بالجبيل
شركة نقل عفش بالخبر
ReplyDeleteشركة نقل عفش بالقطيف
شركة نقل اثاث بالاحساء
شركة نقل عفش الجبيل
شركة نقل عفش بالدمام
Atul gupta
ReplyDeleteAtul Gupta is the chief co- founder and CEO of Tools Energy, a Finance Investment. The organization that finances and develops an adaptable power device system that delivers reliable, clean and competitive energy from an extensive range of fuels....
I like the helpful information you provide in your articles. I will bookmark your weblog and check again here frequently. I am quite certain I'll learn many new stuff right here! Best of luck for the next!
ReplyDeleteducklife 4
Your article completely convinced me. Thank you for sharing. microsoft office 2017 product key; [url=http://productkeyfrees.com/product-keys/windows-7-product-key/]WINDOWS 7 PRODUCT KEY[/url]
ReplyDeleteLovely Post Thanks For Share Keep It Up.
ReplyDeletehttp://happy-new-year01.wikidot.com/
http://newyearwishes.cabanova.com/
https://happynewyear19.yolasite.com/
https://imehndidesigns.jimdo.com/
https://happy-new-year.hatenablog.com/
https://sites.google.com/view/happy-new-year-message/home
Nice Post.
ReplyDeletehttp://happy-new-year-messages01.blogspot.com/2018/06/happy-new-year-wishes.html
https://penzu.com/public/415479c6
https://new-year01.page.tl/
http://newyear.emyspot.com/
http://happynewyear.portfoliobox.net/
Auto title advances are additionally known for its quick preparing and endorsement.To the individuals who need quick money, this advance is certainly for you.car title loans chicago
ReplyDeletefree fb hacks
ReplyDeletefree fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
free fb hacks
Mumbai Call girls
ReplyDeleteMumbai Call girls
Mumbai Call girls
Mumbai Call girls
Mumbai Call girls
Mumbai Call girls
Mumbai Call girls
Loved it. Do not forget to read Sad Shayari in Hindi and Hindi Love Shayari.
ReplyDeleteAvast Support Phone Number
ReplyDeleteMcAfee Antivirus Phone Number
Norton Support Phone Number
Malwarebytes Phone Number
apple support in australia
ReplyDeletenorton chat support
hp support australia
Brother printer support
mcafee support
Click here norton customer support number
ReplyDeleteClick here McAfee customer service phone number
Click here Malwarebytes support phone number
Click here Hp printer installation support number
Click here Canon printer technical support number usa
Thanks for you for putting them all in a single place! it is difficult to get the cast right with therefore several people! and with the shows being only once a week, by enough time you get them down in your face, you never see them again! Great job, and thank you for staying true to the collection and not providing spoilers! I'm incredibly content with teh way the collection sticks to the specific discussion of the books! And I believe the castings have been fabulous! I especially like Tyreon...his character has more type than all the others of his family!
ReplyDeleteNew Celebrity Net Worth Gucci Mane
New Celebrity Net Worth Eminem
New Celebrity Net Beyonce
New Celebrity Net Adam Sandler
New Celebrity Net Jerry Seinfeld
New Celebrity Net Kevin Hart
New Celebrity Net Triple H
New Celebrity Net John Cena
New Celebrity Net Julia Louis Dreyfus
New Celebrity Net David Bowie
This is really an amazing blog. Your blog is really good and your article has always good thank you for information.
ReplyDeleteโปรโมชั่นGclub ของทางทีมงานตอนนี้แจกฟรีโบนัส 50%
เพียงแค่คุณสมัคร Gclub กับทางทีมงานของเราเพียงเท่านั้น
ร่วมมาเป็นส่วนหนึ่งกับเว็บไซต์คาสิโนออนไลน์ของเราได้เลยค่ะ
สมัครสล็อตออนไลน์ >>> goldenslot
สนใจร่วมลงทุนกับเรา สมัครเอเย่น Gclub คลิ๊กได้เลย
Excellent Post as always and you have a great post and i like it thank you for sharing
ReplyDeleteเว็บไซต์คาสิโนออนไลน์ที่ได้คุณภาพอับดับ 1 ของประเทศ
เป็นเว็บไซต์การพนันออนไลน์ที่มีคนมา สมัคร Gclub Royal1688
และยังมีหวยให้คุณได้เล่น สมัครหวยออนไลน์ ได้เลย
สมัครสมาชิกที่นี่ >>> Gclub Royal1688
ร่วมลงทุนสมัครเอเย่นคาสิโนกับทีมงานของเราได้เลย
Our Pay for nursing papers made easy services and research writing services makes your college life bearable and fulfilling by enabling you to pass your exams and also in other research and essay writing tasks.
ReplyDeletecanon printer technical support phone number
ReplyDeletecanon Technical Support
canon Printer Tech Support Phone Number
canon Printer Tech Support Number
canon printer error code 5100
canon pixma mx490 wireless setup
canon mx328 pixma printer error code u163
HP Printer Support Phone Number usa
ReplyDeletehp Printer Technical Support Phone Number
hp Printer Technical Support Number
hp Printer Tech Support
hp Tech Support
hp Printer Customer Support Number
HP Printer Customer Service Number
HP Printer Customer Care Number
HP Printer Contact Number
HP Printer Helpline Number
HP Printer TollFree Number
hp printer error code
hp printer error 0xc19a0003
scan from hp printer to pc
A temporary software malfunction will be cleared after following the process and will allow you to operate your printer again. for more help & support, you must contact HP printer support Number for expert’s advice.
ReplyDeleteHp printer toll free number | Hp printer support number