[mercury-users] Possum

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 20 17:39:03 AEST 1999


On 20-Sep-1999, Dan Hazel <d.hazel at mailbox.uq.edu.au> wrote:
> 
> The Linux version is the one transparently available on the pages
> below.  The Solaris version is available on request - or just by
> looking a little harder.  This is because the Solaris version is
> much much slower.  Any ideas as to why this might be (without 
> having seen the code :-) ?

Hmm...  that's a tough one.

I can only guess.  Perhaps you are doing lots of calls from C to
Mercury in your inner loop?  Currenty each call from C to Mercury does
a setjmp() and longjmp() and on Solaris I think setjmp()/longjmp() are
quite inefficient because longjmp() does a system call to restore the
signal mask.  _If_ that is the cause, then the solution would be to
replace the calls to setjmp()/longjmp() in runtime/mercury_engine.c
with calls to _setjmp()/_longjmp().

You could try using the Mercury profiler and/or the `strace' utility
to see where the time is being spent.

-- 
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.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list