See the sibling comments, passing binary refs that refer to Matrex blobs is pretty much what the Matrex library is doing. The refs returned are in a binary format (not sure exactly if it's just the C memory representation or based on Matlab's `.mat` format). It'd be possible to say utilize Elixir macros to build up an AST for common math formulas that could be passed to the native maths library for example which could be pretty fast.