Arc Forumnew | comments | leaders | submit | roggan's commentslogin

Im new here and don't really code ARC. But I do develop a .NET based Lisp engine. (so I lurk here to get some more understanding about ARC)

Anyway, My .NET based engine also fails on the OP's code. It takes ages to get the result. (60 sec ish on my machine here)

But: if I simply activate tail recursion in my engine, I can solve (fib 20000) in __0.4 sec__

So atleast in my case, its a matter of recursion and memory problems.

So without having any knowledge at all about Arc, My guess would be that the problem could be similair.

To see if the problem is the same, Id you should implement fib in its itterative form instead and compare the languages.

If the differences aer small, then it's simply Arc that is having problem with memory handing in deep recursions..

//Roger www.rogeralsing.com

-----

2 points by bwerf 6066 days ago | link

That is not actually possible without memoization or using another fib function. The complexity of the 'standard' fib function for 'benchmarks' is exponential. 2^20000 is kind of big for the number of computational steps. so my guess is you have a serious bug, or are cheating.

-----