experiences

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 17 01:25:12 AEDT 1999


On 16-Mar-1999, Henk Vandecasteele <Henk.Vandecasteele at cs.kuleuven.ac.be> wrote:
> 
> I'm using Mercury-0.8 and have some strange experiences.
> I compared using grade asm_fast.tr and asm_fast.gc.tr
> On a solaris machine switching off the garbage collector 
> SLOWS DOWN the execution.
> On a linux-machine the exection is slightly faster without
> garbage collection.
> It concerns small programs perfoming no garbage collection
> even with the grade having gc.
> On older versions of mercury, programs running without 
> garbage collector were running much faster without garbage collection
> both on linux and solaris.
> Is there an explanation. Has it to do with the trailing 
> or maybe with a new version of the garbage collector?

Off-hand I don't have any idea what is causing that.

Benchmarking is a rather black art, especially with modern
architectures.  Sometimes you can get different benchmark
results simply because code happens to be placed at different
addresses, resulting in more or fewer cache collisions.

If you can't figure it out, and it's troubling you, then
perhaps you could post the complete source code, benchmark scripts,
and timing results.

> Another matter. A new version of gcc has been installed on our
> solaris machines. We switched from gcc-2.8.0  to egcs-2.93.11
> The version of mercury compiled with gcc 2.8.0 seems not comaptible
> with egcs-2.93.11. Is it worth the try to
> recompile the compiler and libs with egcs-2.93.11, any experiences
> on that?

We haven't tried with egcs-2.93.11, but Mercury does work fine on SPARCs
and elsewhere with egcs-2.91.57 (egcs-1.1 release).

However, before you try recompiling, I suggest you try adding
`-fno-gcse' to the definition of `CFLAGS_FOR_GOTOS' in the
`mmc' and `mgnuc' scripts.  This is required for egcs but
must not be present for gcc 2.8.  The Mercury configure script checks
whether you are running gcc 2.8 or egcs and defines the CFLAGS_FOR_GOTOS
accordingly.  This is done only at configure time, not every time
you run `mmc' or `mgnuc', so if you upgrade from gcc-2.8 to egcs without
reinstalling Mercury you will run into problems, as you observed.
But editing these scripts by hand may be a little easier than reinstalling.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the users mailing list