[Pharo-project] FFI versus Alien versus NativeBoost (was FFI versus Aloen)
smalltalktelevision at gmail.com
Thu Jun 9 23:58:52 EDT 2011
I believe there are three outlined in the description on SqueakSource:
"It supports faster call sequence, return code setting, and callbacks to execute smalltalk code from the FFI routine."
There's something about that last one: callbacks. I think FFI gives a return value, but you can't create a callback.
> NativeBoost is faster than FFI, but NB is a whole other ball-of-wax, and I'd like to support it eventually as well as FFI/Alien.
Another way to look at it is via what Goran said: in terms of age. FFI is oldest and most well known. Alien less so. NativeBoost is
Igor's project and I don't think is widely adopted yet. (Igor's going to show up and squish me like a bug, but oh well... )
Igor did say something interesting about FFI versus plugins at Deep Into Smalltalk. I believe he wrote Native Boost because he was
tired of endlessly recompiling vms with plugins. I don't think there is any standard vm with NB in it, which means that's exactly
what you're going to need to do to use NB.
FFI has a reputation as something that's a bit touchy. It looks a little easier than it is. The prudent choice would be for you to use
FFI and curb your ambition away from Alien or NB until later.
There are lots more examples of FFI around than Alien and NB combined. OpenSophie has copious code examples.
I have to stop now. I'm only making it worse for when Igor arrives... must go! :p
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev