Julia does this at runtime. You can create an arbitrarily sized and typed array and call a function. If no implementation exists specialized for that type, it will automatically compile one using LLVM.
(The function that creates the array will be slower since it's not type-stable, but it can generate a type-stable function that's fast.)
Comments
Julia does this at runtime. You can create an arbitrarily sized and typed array and call a function. If no implementation exists specialized for that type, it will automatically compile one using LLVM.
(The function that creates the array will be slower since it's not type-stable, but it can generate a type-stable function that's fast.)