Hi all,
We are very close to releasing v4.4 of Hyperscan, which includes a new feature that we are
calling the "fat runtime". This has been pushed to the develop branch on Github
if anyone would like to test it before the release.
Essentially, when building the fat runtime, the Hyperscan runtime code will be compiled
multiple times for different instruction sets, and these compiled objects are combined
into one library. There are no changes to how user applications are built against this
library.
When applications are executed, the correct version of the runtime is selected for the
machine that it is running on. This is done using a CPUID check for the presence of the
instruction set, and then an indirect function is resolved so that the right version of
each API function is used. There is no impact on function call performance, as this check
and resolution is performed by the ELF loader once when the binary is loaded.
As this requires compiler, libc, and binutils support, at this time the fat runtime will
only be enabled for Linux builds where the compiler supports the indirect function
"ifunc" function attribute:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-...
This attribute should be on all supported versions of GCC, and recent versions of Clang
and ICC. There is currently no support for this feature on non-Linux systems.
Release builds of Hyperscan will default to having the fat runtime enabled - this is the
"FAT_RUNTIME" flag in CMake.
Regards,
Matt.