Hacker News new | ask | show | jobs
by Gondolin 2818 days ago
Any matrix implementation (with fast exponentiation) is going to be much faster, even in a "slow" language. For instance, in ruby, `Matrix[[1,1],[1,0]] * * 46` is instantaneous (real time: 0.000131s).

We have to go up to the ten million'th term to get something that is not instantaneous (0.486s) for a result which has 2089876 digits.

1 comments

Are you sure `Matrix[[1,1],[1,0]] * * 46` isn't optimized into a constant value by the bytecode compiler? Idk Ruby much, but it seems like a possiblity.