Performace is impressive indeed!

and why shouldn't  you use

3 :'(,{:+{:@}:)^: y (0 1)'

??



Viktor Cerovski schreef:
> You are right and if you want fast fib's, look at
> http://www.jsoftware.com/jwiki/Essays/Fibonacci_Sequence 
>
> Thanks for the link.  I've checked out the code there, lots of
> very interesting solutions, but haven't found any one
> similar to '(,[EMAIL PROTECTED])^:34(1 0)'
>
>
>   
>> But I wanted a solution as close as possible to those used in the other
>> languages.
>>
>>     
> Fair enough.  We had a long thread about benchmarking recently with
> many insightful remarks.  As Raul Miller mentioned, with which I agree,
> if we want a code implementing a given solution that is similar across 
> several different languages, that implies existence of a certain underlying 
> code that is independent of actual programming languages used.
>
>
>
>   
>> Perhaps the conclusion should be: don't use J (as your first choice) for
>> non
>> memoized recurrent solutions.
>>
>>     
>
> Still, we can consider a non-memoized solution that is short and fast:
>
> 10000 (6!:2) '(,[EMAIL PROTECTED])^:34(1 0)'
> 0.0001093761917
>
>   

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

Reply via email to