Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Fibonaccio - Was: Report on WinCE Rebol --- Speed Comparison

From: dness:home at: 29-Jun-2001 1:36

Bard Papegaaij wrote:
> Hi, > > I noticed you are using a recursive fibonaccio function to measure speed on > different platforms. Some time ago I implemented a fibonaccio generator as a > way of learning various aspects of REBOL. Features I used are: > - an object to store the function and some house-keeping variables; > - an iterating definition instead of the recursive one to get rid of stack > overflows;
[snip] ... If one were actually interested in generating fibonacci numbers then neither recursion nor iteration nor memory functions are needed as there is, IIRC, a straightforward closed form for the fibonnaci which would evaluate for any N at the cost of a couple of logs and a couple of exponentials. The objective here was, of course, to compare the machines and thus we wanted to use functions that consumed some detectable amount of time. Trying to make those functions `efficient' doesn't, it is clear, make sense for that purpose.