I'm trying to speed up the exact iterative calculation of the 1E9 th Fibonacci number, which has 208987640 digits. Working with Python and mpmath I've reached an acceptable time, but I'm looking to further reduce it using Cython. In this case the overload is due to the huge numbers, stored in Knuth's 2 x 2 matrices, that have been defined using Numpy and mpmath. For Cython to be helpful in this subject, I should define those matrices as static, but I don't know the type I should use to define it. Is there a special type for this case?