TE
TechEcho
AccueilTop 24hRécentsMeilleursQuestionsPrésentationsEmplois
GitHubTwitter
Accueil

TechEcho

Une plateforme d'actualités technologiques construite avec Next.js, fournissant des nouvelles et discussions technologiques mondiales.

GitHubTwitter

Accueil

AccueilRécentsMeilleursQuestionsPrésentationsEmplois

Ressources

HackerNews APIHackerNews OriginalNext.js

© 2025 TechEcho. Tous droits réservés.

Fast Allocations in Ruby 3.5

262 pointspar tekknolagiil y a 3 jours

8 comments

hinkleyil y a 3 jours
&gt; I’ve been interested in speeding up allocations for quite some time. We know that calling a C function from Ruby incurs some overhead, and that the overhead depends on the type of parameters we pass.<p>&gt; it seemed quite natural to use the triple-dot forwarding syntax (...).<p>&gt; Unfortunately I found that using ... was quite expensive<p>&gt; This lead me to implement an optimization for ... .<p>That’s some excellent yak shaving. And speaking up … in any language is good news even if allocation is not faster.
评论 #44069998 未加载
N_A_T_Eil y a 2 jours
Ruby keeps on getting better. I wouldn&#x27;t hesitate to start new projects in ruby.
评论 #44080334 未加载
alberthil y a 3 jours
Can someone explain, is YJIT being abandoned over the new ZJIT? [0]<p>And if so, will these YJIT features likes Fast Allocations be brought to ZJIT?<p><a href="https:&#x2F;&#x2F;railsatscale.com&#x2F;2025-05-14-merge-zjit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;railsatscale.com&#x2F;2025-05-14-merge-zjit&#x2F;</a>
评论 #44063433 未加载
评论 #44070955 未加载
评论 #44062503 未加载
评论 #44066682 未加载
评论 #44062495 未加载
90s_devil y a 3 jours
It seems to me like all languages are converging towards something like WASM. I wonder if in 20 years we will see WASM become the de facto platform that all apps can compile to and all operating systems can run near-natively with only a thin like WASI but more convenient.
评论 #44070896 未加载
评论 #44062810 未加载
评论 #44065580 未加载
hinkleyil y a 3 jours
&gt; It’s very rare for code to allocate exactly the same type of object many times in a row, so the class of the instance local variable will change quite frequently.<p>That’s dangerous thinking because constructors will be a bimodal distribution.<p>Either a graph of calls or objects will contain a large number of unique objects, layers of alternating objects, or a lot of one type of object. Any map function for instance will tend to return a bunch of the same object. When the median and the mean diverge like this your thinking about perf gets muddy. An inline cache will make bulk allocations in list comprehensions faster. It won’t make creating DAGs faster. One is better than none.
评论 #44066108 未加载
评论 #44065417 未加载
firemeltil y a 3 jours
did it means more speeds to all rails&#x2F;active records collections?
ksecil y a 3 jours
I know I may be jumping the gun a little here but I wonder what percentage speedup could we expect on typical rails applications. Especially with Active Record.
评论 #44062923 未加载
评论 #44063137 未加载
评论 #44063339 未加载
GGOil y a 3 jours
dup of <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=44057476">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=44057476</a>
评论 #44063010 未加载
评论 #44063144 未加载