GNU released Guile 2.9.1 beta of the extension language for the GNU project. It is the first pre-release leading up to the 3.0 release series.
In comparison to the current stable series, 2.2.x, Guile 2.9.1 brings support for just-in-time native code generation to speed up all Guile programs.
Just-in-time code generation in Guile 2.9
Relative to Guile 2.2, Guile programs now run up to 4 times faster. This is due to just-in-time (JIT) native code generation.
JIT compilation is enabled automatically in this release. To disable it, configure Guile with either `–enable-jit=no’ or `–disable-jit’. The default is `–enable-jit=auto’, which enables the JIT. JIT support is limited to x86-64 platforms currently. Eventually, it will expand to all architectures supported by GNU Lightning. Users on other platforms can try passing `–enable-jit=yes’ to see if JIT is available on their platform.
Relative to the virtual machine in Guile 2.2, Guile’s VM instruction set is now more low-level. This allows expressing advanced optimizations, like type check elision or integer devirtualization, and makes JIT code generation easier.
This low-level change can mean that for a given function, the corresponding number of instructions in Guile 3.0 may be higher than Guile 2.2. This can lead to slowdowns when the function is interpreted.
GOOPS classes are not redefinable by default
All GOOPS classes were redefinable in theory if not practically. This was supported by an indirection (or dereference operator) in all “struct” instances. Even though only a subset of structs would need redefinition the indirection is removed to speed up Guile records. It also allows immutable Guile records to eventually be described by classes, and enables some optimizations in core GOOPS classes that shouldn’t be redefined.
In GOOPS, now there are classes that are both redefinable and not redefinable. The classes created with GOOPS by default are not redefinable. In order to make a class redefinable, it should be an instance of `<redefinable-class>’.
Also, scm_t_uint8, etc are deprecated in favor of C99 stdint.h.
This release does not offer any API or ABI stability guarantees. Stick to the stable 2.2 release if you want a stable working version.
You can read more in the release notes on the GNU website.