muparserSSE is an mathematical expression parser able to compile a given mathematical expression into machine code for Intel processors at runtime. It will take an expression as well as variable definitions as its input and return the pointer to a just in time compiled function made up of fast SSE instructions. You can extend it with custom callback functions and operators. muparserSSE is based on asmjit a just in time compiler written by Petr Kobalicek and the original muparser project.
Since this is a fork of muparser its interface and features are pretty similar. However i had to remove some of muparsers more "esotheric" features in order to get the work done. A complete implementation just would have taken to much time and muparser has some features that are rarely used anyway. On the other side i added some operators in order to expose as much of the SSE instructions to the user as possible. The following table compares muparserSSE with the other parsers of the muparser family. A detailed description of the differences is listed below.
|Parser||Data types||Precision||User defined operators||User defined functions||Locale
(Expr. per second)*
|muparserSSE||float||max. 5||MIT||~ 20.000.000 -
|muparserX||double||BSD New||~ 1.600.000|
The current release contains a DLL and Project files for 32 bit Windows only. Since both asmjit and muparser are running on Linux too compiling the library under Linux should be possible but has'nt been tested. The same applies to 64 bit systems as well as Apples OSX. The following features are supported by muparserSSE:
Special thanks to Petr Kobalicek for writing the asmjit just in time compiler and making it available as open source. Writing muparserSSE wouldn't have been possible without asmjit!
You might also like: