TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

RJIT, a new JIT for Ruby

336 点作者 pmarin大约 2 年前

16 条评论

titzer大约 2 年前
Honest question, I do not know Ruby&#x27;s semantics well. But, as someone who has worked on many JITs in the past, how is it in these results, <i>three different</i> JITs failed at getting more than a 2x performance improvement? Normally, a JIT is a 10-20x improvement in performance, just from the simple fact of removing the interpreter dispatch loop. What am I missing?
评论 #35075743 未加载
评论 #35077786 未加载
评论 #35074649 未加载
评论 #35080071 未加载
sparker72678大约 2 年前
I love all the attention Ruby performance is getting lately!
评论 #35071037 未加载
sambostock大约 2 年前
Several points discussed in these comments are addressed by the author in the linked <a href="https:&#x2F;&#x2F;bugs.ruby-lang.org&#x2F;issues&#x2F;19420" rel="nofollow">https:&#x2F;&#x2F;bugs.ruby-lang.org&#x2F;issues&#x2F;19420</a>
zac23or大约 2 年前
I work everyday with Rails.<p>In my experience, Ruby is not super slow.<p>In my machine, I can create 1M of empty hashs on 0.17sec.<p><pre><code> Benchmark.measure{1000000.times{Hash.new}} @total = 0.1706789999999998s </code></pre> It&#x27;s very good for a dynamic language.<p>But ActiveRecord (and Rails) are incredibly slow.<p>In my machine in 0.17sec only 2000 Models can be created.<p><pre><code> Benchmark.measure{2000.times{User.new}} @total = @total=0.17733399999999833. </code></pre> Some SQL+Network runs in less than 10ms, in these cases Active Models creation is slower than that.<p>Yes, Rails can be slower than database access.
评论 #35074790 未加载
评论 #35077697 未加载
评论 #35074787 未加载
评论 #35076760 未加载
评论 #35078584 未加载
pawelduda大约 2 年前
Quite interesting. My takeaway is that it can be on par with YJIT or even outperform it despite being in early development.<p>Btw one project I work on switched to YJIT in production and there are no problems so far (but no noticeable perf gains either)
评论 #35074509 未加载
评论 #35073681 未加载
评论 #35070621 未加载
pjmlp大约 2 年前
From compiler nerd point of view, this is great piece of work.<p>Another meta-circular JIT implementation, instead of going the tried and through path that most keep on trailing.<p>Looking forward how it evolves from there.
mabbo大约 2 年前
Does RJIT get JIT compiled... by itself? That would be lovely in the sense that as RJIT finds more optimizations to speed up code, it would become itself faster.
评论 #35072999 未加载
评论 #35072700 未加载
yxhuvud大约 2 年前
Are they adding a new jit each version now?
评论 #35073107 未加载
foxandmouse大约 2 年前
Is there any use of ruby in the deep learning space? It&#x27;s my language of choice, but Python seems to be ubiquitous.
评论 #35075245 未加载
rco8786大约 2 年前
Why would one use this over YJIT?
评论 #35071994 未加载
评论 #35070347 未加载
评论 #35070528 未加载
评论 #35070358 未加载
beders大约 2 年前
Is jRuby still a thing? I didn&#x27;t see it in the perf comparisons.
评论 #35074488 未加载
评论 #35080091 未加载
CyberDildonics大约 2 年前
These comparisons seem to be to other ruby implementations. How does this compare to LuaJIT ?
评论 #35071941 未加载
评论 #35073206 未加载
评论 #35074520 未加载
Alifatisk大约 2 年前
&gt; …many methods are direct translations of the Rust code into Ruby.<p>Impressive
jhoechtl大约 2 年前
Boy I lost track of all the Ruby Jit attempts.<p>According to the computer language shootout all micro-optimizations
评论 #35071326 未加载
评论 #35073963 未加载
barrenko大约 2 年前
Is there any alternative to RubyMine as an IDE for Ruby newbies?
评论 #35074058 未加载
评论 #35078798 未加载
评论 #35074836 未加载
l_theanine大约 2 年前
I&#x27;d definitely be more apt to have this as part of production system instead of the Rust one.<p>Rust has got to be the ugliest, most unfriendly programming language I&#x27;ve ever laid my eyes on. And I wrote Perl for 10+ years, so that&#x27;s really quite a feat of aesthetics failure.<p>Anyhow, I&#x27;m pretty impressed with the performance thus far, I like the idea of having multiple JITs available for a single-language ecosystem, regardless of how disgusting the language used to implement them. I think having competition means that there will be a race to the bottom and towards the &quot;center&quot; of general work. It&#x27;s already really cool to see how the different approaches have clear preferences of the tasks they excel at and where they fall short.<p>This is hugely valuable because it pushes Ruby forward for everybody, and will hopefully result in not only a faster Ruby for X, but a faster Ruby for everything, which is just an objectively good thing.<p>Python is in a weird spot in this arena, because it is very clearly and very strongly orienting itself to continue to dominate practical data science work, and that means the need for JITs to handle regular jobs like text munging and whatnot fall by the side in order for the latest NumPy and Jax stuff, whatever is the current hot shit in the AIverse. Ruby doesn&#x27;t suffer from that because it&#x27;s pretty solidly lodged in the web development sphere, while also having a capable presence in netsec tools, application scripting, and probably a few more areas that I&#x27;m not aware of.<p>If you&#x27;re interested in some of cutting edge Python stuff, I&#x27;d recommend taking a look at exaloop&#x2F;Codon. Codon will soon be able to output Python extensions that are compatible with Python&#x27;s setuptools, so it will soon be possible to just include some .codon files with your project, use setup.py, and have decorators that can (literally) 100x your hot loops.
评论 #35072771 未加载
评论 #35079363 未加载