From: Charles Oliver Nutter Date: 2008-11-01T20:16:23+09:00 Subject: Re: [ANN] FFI 0.1.1 (Foreign Function Interface) for Ruby 1.8.6/7 and 1.9 Luc Heinrich wrote: > On 1 nov. 08, at 11:19, Charles Oliver Nutter wrote: > >> And then I completely forgot to include the blog post URL... > > Looks cool, great work. > > Two questions: > > - Are variadic functions supported? > - Do you have any idea or measurements of the overhead of calling > through FFI as opposed to using a compiled extension? Wayne answers the latter, sorta, on his followup blog post: http://blog.headius.com/2008/10/ffi-for-ruby-now-available.html He doesn't have specific numbers for performance at the moment, but the short story is that FFI introduces a bit of overhead; ultimately I believe that the overhead gets lost in the flow of a Ruby application, especially when you're tossing units of work across like SQL queries or arrays. Wayne probably can fill in more details on what the actual overhead is like. And I'd also expect that any small amount of overhead is vastly outweighed by the ability to write an FFI-based library once and use it across implementations. - Charlie