Strict<->Lazy?

Siegfried Gonzi siegfried.gonzi@kfunigraz.ac.at
Fri, 02 Jul 1999 08:14:32 +0200



"Richard A. O'Keefe" wrote:

>
> I was a bit surprised by this, so I tried it on a SPARCstation 5 running
> Solaris 2.6.  What I found was that Clean was *faster* than C:
>
> 8.0 sec   C version (cc -native -fast -xO5)
> 5.7 sec   Clean version (clm version 1.3.1)

This is a good news. I am not a C programmer. But the problem often arises on
workstations because the compiler or the program itself is not optimized. IDL
(Interactive Data Language) tooks 1min  for a loop (pseudocde: i=1,1000 000 0
sum=sum+i) on a Pentium 166MHz. On a workstation (Sun Solaris) IDL tooks for that
code 7min!!!. On my Macintosh (100MHz 603e) the code with IDL tooks 0.5min.
Fortran 90 makes the job on the workstation in 20sec.

Omikron Basic is very fast (part of Omikron is written in Assembler). It makes the
fibonacci numbers in real-time. The problem of Omikron Basic is, that it is not
platform independent and it tooks ,e.g. to read a record of 15 000 lines 15sec!.
MATLAB makes the job in 3sec.

>   If someone really needs Fibonacci numbers in a program, they certainly
> won't use the naive exponential time code:  they'll use the O(1) method.

I know this since yesterday. Maybe it is of interest in this context that Maple is
evaluating fibonacci numbers with the "naive" code in real-time.


Greetings,
Siegfried Gonzi