> 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)'
The expression (,[EMAIL PROTECTED])^:34(1 0) is very similar to f2a in http://www.jsoftware.com/jwiki/Essays/Fibonacci_Sequence#iteration ----- Original Message ----- From: Viktor Cerovski <[EMAIL PROTECTED]> Date: Thursday, January 3, 2008 7:41 Subject: RE: [Jgeneral] Performance comparison To: [email protected] > 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
