simonmar 2004/02/25 09:35:45 PST
Modified files:
ghc/rts Schedule.c
Log:
Feeble performance hack for the threaded RTS: instead of
allocating/releasing a new condition variable for each new call-in, we
just cache one in the RTS and re-use it for the next call.
So now the non-threaded RTS doesn't build because there's an #ifdef missing (type Condition isn't defined). That's easy to fix.
But the threaded RTS breaks on Mac OS X and probably on other pthreads platforms because the Condition type is _not_ a pointer but a struct and therefore can't be initialized to NULL.
On a little test I have here which does lots of call-ins on Windows,
this reduces the slowdown for using the threaded RTS from a factor of
7-8 down to a factor of 4-5. I'm aiming for a factor of 2 or better...
I assume that test doesn't work without Visual Studio and therefore can't be run on other platforms?
By the way, on Mac OS X, initCondition a.k.a. pthread_cond_init does no syscall and takes about fifteen instructions in total :-) .
Cheers,
Wolfgang
_______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
