Native boost

Igor Stasenko


NativeBoost is a project, which enabling running machine code, generated dynamically by language side.

It requires a small plugin and little modification(s) to Virtual Machine in order to enable running native code. The rest functionality residing at language side. At language side, there are two major parts - AsmJit, a package which lets you generate x86 machine code, and NativeBoost package which makes use of it and provides a layer for generating primitives and FFI callout code. Since with NativeBoost we can control, what code should be generated at run time, it gives us much more flexibility as well as performance comparing to implementing same low-lever functionality in C. As it demonstrates, a FFI callout code, generated by NativeBoost could be up to 10-20 times faster than original Squeak FFI plugin. Another advantage of using NativeBoost is for generating a primitive code on the fly. Like that, developers can ship their primitive code written in normal smalltalk, and don't need to include separate external modules which contain a precompiled primitives for extra functionality. It means that users can just download the code and run it, and don't bother with extra DLLs etc.

The main idea behind this project is when you want to extend VM (like implementing new primitives, or connect with external library), you can do that without the need to modify VM anymore.

Native Boost project page


Igor Stasenko is currently INRIA engineer working on Pharo



Download MP4