Speed of FP languages, prospects (was Re: Benchmarking Lazy Functional Languages) 
Author Message
 Speed of FP languages, prospects (was Re: Benchmarking Lazy Functional Languages)

Seeing as I'm using a functional language (Sisal) which promises high
performance on numerical code, I figured I'd do a small sloppy benchmark
and give you the results. Performance and automatic parallelization
is Sisal's claim to fame here --- they claim scalar performance similar to the
best fortran compilers (sometimes a bit better, sometimes a bit worse) and
superior parallel performance, often much superior. I'm only testing the
scalar performance, as I don't have an automatically parallelizing C compiler.

I compared how well the optimizing Sisal compiler OSC does with a kernel I
use, a tridiagonal matrix solver. My sisal routine is copied virtually
straight out of the Numerical Recipes in C routine, which is what I compared
it with, compiled with the Sun C compiler (Solaris 2.4). I wrote very similar
drivers, one for each language.

The results were interesting. At first, the Sisal version ran around three
times faster. This was confusing, so I spent some time tweaking the C
code and compilation options. Most things had only small effects, until I
eventually discovered and put in by hand one optimization (lifting a loop
invariant in the driver) that OSC must have
done automatically. After that, the C code was nearly as fast as the Sisal
code, only about 10% slower.

Don't know what to conclude from this, except that C compilers can't
optimize very well (gcc didn't do much better). I suppose I should try
Fortran for a fair test --- C is a hard language to optimize.
Other reasons why this means nothing: time in the driver dominated the
performance for the C code, everything is very regular with respect to
memory use, I've tried other things (insertion sort)
that went the other way, and so on. But the bottom line was that, for this
program, it took a fair bit of tweaking to get the performance of the C
close to that of the untweaked Sisal.

doug.



Fri, 17 Apr 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Benchmarking Lazy Functional Languages

2. multiplatform GUI design with parallelized lazy functional language

3. Lazy and Strict Functional languages

4. speed improvements to lazy languages

5. Partial Evaluation for Lazy Functional Languages

6. Monitoring (Lazy) Functional Languages

7. Profiling Lazy Functional Languages

8. Time complexity of lazy programs. profiling functional languages

9. Lazy-evaluation functional language for MS DOS

10. Applications for lazy functional languages

11. Functional Programming Languages with Lazy Evaluation

12. Parial Evaluation & Lazy Functional Language

 

 
Powered by phpBB® Forum Software