mit-scheme-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: If statements


From: Dave Pawson
Subject: Re: If statements
Date: Thu, 7 Jul 2022 08:09:20 +0100

On Thu, 7 Jul 2022 at 08:06, David Gray <dgray@iesl.forth.gr> wrote:
>
>
> Something a little more prosaic after the last set of messages on 
> mit-scheme-devel.
> Just to get a feel for the speed and stability of a new system I run a long 
> Fibonacci recursive functioning and I must have mixed up an old version which 
> was much faster, (fib 42) -> 3s instead of 25s, and the only difference seems 
> to be the following if statement.
>
> (if (<= n 2)
> 1
> (fib…….
>
> (if (or (= n 1)
>           (= n 2)
>      1
> (fib………
>
> Is the underlying code so different?

Assembler, that would be 5 operations vs 2?

HTH


>
>
>



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]