Arie Groeneveld wrote:
> 
> 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
> 

Yes, I was thinking more of 'fib"0 i. n'

-- 
View this message in context: 
http://www.nabble.com/Performance-comparison-tp14595315s24193p14598560.html
Sent from the J General mailing list archive at Nabble.com.

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

Reply via email to