Fast Allocations in Ruby 3.5
from 耳で聞くHacker News
Ruby 3.5でのオブジェクト割り当て速度が大幅に向上。Aaron Patterson氏の記事では、新しいYARV命令「opt_new」を導入し、`Class#new`をインライン化することで、オブジェクト割り当てを最大6.5倍高速化できたと説明。インライン化により、スタックフレームの削減、引数コピーの排除、インラインキャッシュヒット率の向上が実現。キーワード引数が多いほど効果が高く、Ruby 3.5では`Class#new`のフレームが消えるというわずかな互換性の変化がある。
Embed this episode
No transcript yet.
Frequently asked questions
When was this 耳で聞くHacker News episode published?
This episode was published on May 23, 2025.
Can I download this 耳で聞くHacker News episode?
Yes. Use the download control on the episode player to save the publisher-provided media file.