[fpc-devel] C++ gets language-internal concurrency support

Michael Schnell mschnell at lumino.de
Fri Aug 19 12:30:43 CEST 2011


On 08/17/2011 06:49 PM, David W Noon wrote:
> Perhaps the slower execution speed of CIL (.NET,
> Mono) byte code masks the context switching overheads and makes this
> practice look less inefficient.

I doubt that this is the case. AFAIK, CIL code is not necessarily much 
slower than native code. (Of course it can be much slower, especially 
when garbage collection is necessary.)

But when using a parallel loop "decently" i.e. for doing not too short 
unrelated calculations with only so many parallel threads as processors 
are available, this is supposed to grant a good speedup. AFAIK with 
prism the parallel loop automatically is broken into as many parallel 
threads as available processors, thus avoiding additional context switches.

-Michael



More information about the fpc-devel mailing list