Look at the recursiveness in this specific example: in Javascript, this looks awful!
I think this example needs memoisation just to project y at time period 20 (think about the exponential rise in redundancy! memoisation is a bare minimum requirement).
Even still I think its bad execution.
However, the code is also simple: its not hard to imagine a straightforward conversion to a system with better treatment of recursion, like Haskell. Or a more complicated and delicate conversion to loops.
Imo the output code reflects closely a spreadsheet: dependencies on previous cells. Conversion to spreadsheet is also feasible (if that does much!), as is some fancy runtime basing itself on such execution models.
I amn't spending time on a solution here for now: I do memoisation where I can, have memo-loader as a high priority, and for now I'm trying to use calculang within these limited bounds that I'll get to grips with over time.
So this is an important area where other input/effort would be seriously valued. (I do know its huge, but I just can't give it the attention it deserves atm)