Viktor Cerovski schreef:
>
> fib=: 3 : 0 M.
>  if. 1>:y do. y else. (fib y-1)+fib y-2 end.
> )
> and that will speed up 'fib 35' about 10000 times,
Remember Roger Hui's remarks on this subject, especially about the
result of ts in this case.
   ts 'fib 25'
2.8e_5 37248

but, only time:
   timer 'fib2 25'
2.4775

n.b. all first call's



=@@i


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to