Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Why systhreads?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-11-26 (18:43)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] Why systhreads?

>Factors of 10 are always nice :-)  Just kidding.  What I meant is the
>following: assume making the Caml runtime system thread-safe entails a
>25% slowdown on program execution.  (This can easily happen if e.g. we
>have to lock a mutex at each heap allocation.)  Further assume that by
>doing so, you get a 1.5 speedup from hyperthreading.  In the end, your
>program will run 1.5 * 0.75 = 1.12 times faster than its equivalent
>running on the standard, single-processor Caml runtime.  It's not
>worth the effort.

Sure, that's kinda obvious.  My original question was whether there was a 
known way to do a multithreaded gc that doesn't suck (costing 25% on 
nonthreaded applications does not count as not sucking) that ocaml could 
use if it became worth it (ie. in the event HT was widely adopted and 
actually worked well in practice).  If you're saying the above is the state 
of the art in multithreaded gc, then yes, it's not worth it.  If there was 
a multithreaded gc technique that cost 3% for single threaded apps, and all 
processors in existence were HT-enabled, then the equation starts to look 
different.  I never said this was the case now, or somebody should start 
typing this new gc in, I just wondered if the technology existed in case it 
became interesting.

I find it slightly ironic that I'm the "HyperThread guy" in this thread, 
since I'm pretty anti-hype myself.  Oh well.  Another slightly frustrating 
thing is that 90% of this thread was taken up by stuff that's documented 
(poorly, but still) on the net (whether SMP is supported now, whether async 
io works, whether non-systhreads work in native code, how the global mutex 
works, etc.).  It would be so nice if the FAQ was better formatted and we 
had a way of quickly updating it, but no, I don't have any time for that 
and I'm sure nobody else does either.  And, of course, nobody reads the FAQ 
before posting anyway.  :)


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: