TE
TechEcho
StartseiteTop 24hNeuesteBesteFragenZeigenJobs
GitHubTwitter
Startseite

TechEcho

Eine mit Next.js erstellte Technologie-Nachrichtenplattform, die globale Technologienachrichten und Diskussionen bietet.

GitHubTwitter

Startseite

StartseiteNeuesteBesteFragenZeigenJobs

Ressourcen

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. Alle Rechte vorbehalten.

Fast Allocations in Ruby 3.5

263 Punktevon tekknolagivor 4 Tagen

8 comments

hinkleyvor 3 Tagen
&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_Evor 3 Tagen
Ruby keeps on getting better. I wouldn&#x27;t hesitate to start new projects in ruby.
评论 #44080334 未加载
alberthvor 4 Tagen
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_devvor 4 Tagen
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 未加载
hinkleyvor 3 Tagen
&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 未加载
firemeltvor 4 Tagen
did it means more speeds to all rails&#x2F;active records collections?
ksecvor 4 Tagen
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 未加载
GGOvor 4 Tagen
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 未加载