4 ms·
"optcarrot benchmark https://github.com/mame/optcarrot https://github.com/mame/optcarrot runs around 9x faster on JRuby+Truffle than it does on MRI" That's bla
by xutopia 10y ago
"optcarrot benchmark https://github.com/mame/optcarrot https://github.com/mame/optcarrot runs around 9x faster on JRuby+Truffle than it does on MRI"
That's blazingly fast! The missing part now is C extension support and they seem confident to be able to deliver this.
Color me impressed.
- masklinn 10y ago> The missing part now is C extension support Wasn't part of truffle's point and advantage that it would interpret and JIT C code alongside Ruby code and optimise across the boundary? Is the missing part just the declaration of the MRI API on the C-side, or is it pre-compiled (and thus not interpretable) C extensions?
- steveklabnik 10y agoI _vaguely_ remember a while back that they planned on "interpreting" opcodes, so they could even load pre-compiled extensions. Compilers are cool.
- chrisseaton 10y agoWe wrote a first paper about it back in 2015. We've spent 2016 going back and doing a better implementation of the idea. We hope to make it useful for real C extensions in 2017. So it's still 'missing' in that it isn't integrated and in use yet. We work on the C source code (actually the LLVM bitcode) rather than compiled C extensions, yes.
- masklinn 10y ago> We wrote a first paper about it back in 2015. We've spent 2016 going back and doing a better implementation of the idea. Ah OK, I guess I remember the 2015 news and thought it a "done deal" rather than a POC/WIP. Thanks.
- sandGorgon 10y agoActually, I would deprioritize c extension support. The jruby ecosystem is extremely mature and production ready. For example, database connectors exist which are pure java rather than based on c extensions. They may be better as well. Same goes for ssl (https://github.com/jruby/jruby-openssl/blob/master/README.md https://github.com/jruby/jruby-openssl/blob/master/README.md) and xml parsing (https://github.com/YorickPeterse/oga/blob/master/README.md https://github.com/YorickPeterse/oga/blob/master/README.md) Also goes for all the json parsing, etc stuff which seems to need c extensions. Lots of systems stuff is perfectly workable using jruby (https://github.com/minimagick/minimagick/blob/master/README.md https://github.com/minimagick/minimagick/blob/master/README....) This would be a different story if you were doing jython fof example - python does not have a viable java based ecosystem. If I were you, i would NOT focus on c extensions and instead work on other stuff (like startup speed)
- chrisseaton 10y agoUnfortunately running JRuby's Java extensions doesn't look any easier than C extensions, so we've gone with C extensions to begin with. Both types of extensions are hard because they're written against an API which is just the entire internals of their implementations. If you don't use the same internals it's very hard to meet that API. This explains in depth https://www.youtube.com/watch?v=YLtjkP9bD_U https://www.youtube.com/watch?v=YLtjkP9bD_U
- 1_listerine_pls 10y ago> Color me impressed Is there an HN reader app that does it? or just HN jargon?
- swsieber 10y agoEnglish slang. "Color me X means "I am X". Roughly speaking that is. I think there's a slight connotation of surprise as well.