When I use numba inside python I know that if I try to jit-compile functions which have arbitrary precision floats (mpmath) inside their loops, it will fail to compile in nopython mode and its speed will be same as plain python version. My question is about Julia package DifferentialEquations.jl
. On their main page they say that it supports BigFloats and ArbFloats. I understand that this package also uses loops which are jit-compiled by default by julia. So my question is whether or not DifferentialEquations.jl
functions are jit-compiled when I pass differential equations which use BigFloat numbers.
Yes, they are via function auto-specialization. In Julia, functions will auto-specialize on the concrete types when JIT compiling. This is true for all numbers, and in fact even things like Float64 are just types defined in Julia itself and use these same mechanisms. This blog post describes this pattern in more detail
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With