Skip to content Skip to footer
Tiny JITs for a Faster FFI by hahahacorn

Tiny JITs for a Faster FFI by hahahacorn

7 Comments

  • Post Author
    pestatije
    Posted February 12, 2025 at 10:43 pm

    FFI – Foreign Function Interface, or how to call C from Ruby

  • Post Author
    poisonta
    Posted February 12, 2025 at 10:56 pm

    I can sense why it didn’t go to tenderlovemaking.com

  • Post Author
    internetter
    Posted February 12, 2025 at 10:57 pm

    "write as much Ruby as possible, especially because YJIT can optimize Ruby code but not C code"

    I feel like I'm not getting something. Isn't ruby a pretty slow language? If I was dipping into native I'd want to do as much in native as possible.

  • Post Author
    shortrounddev2
    Posted February 12, 2025 at 11:02 pm

    Does ruby have its equivalent to typescript, with type annotations? The language sounds interesting but I tend not to give dynamically typed languages the time of day

  • Post Author
    chris12321
    Posted February 12, 2025 at 11:05 pm

    Between Rails At Scale and byroot's blogs, it's currently a fantastic time to be interested in in-depth discussions around Ruby internals and performance! And with all the recent improvements in Ruby and Rails, it's a great time to be a Rubyist in general!

  • Post Author
    nialv7
    Posted February 12, 2025 at 11:51 pm

    isn't this exactly what libffi does?

  • Post Author
    haberman
    Posted February 13, 2025 at 12:29 am

    > Rather than calling out to a 3rd party library, could we just JIT the code required to call the external function?

    I am pretty sure this is the basis of the LuaJIT FFI: https://luajit.org/ext_ffi.html

    I think LuaJIT's FFI is very fast for this reason.

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.