Yeh. I guess my years as a Forth programmer are showing. I don't
program that way :)

Still putting the burden for much concurrency on a tool, call it
a compiler or whatever seems to me to make sense. We are always
going to have programmers with varying ability and while education
certainly can help better tools can as well.

BobLQ


On 4/4/07, Christopher Smith <[EMAIL PROTECTED]> wrote:
Bob La Quey wrote:

> Simple example. Say I have loop  that runs for M times. Say I have N
> cores. Why not have the complier generate the code (including managing
> memory) to run N loop  instances and thus run in approoximately 1/N the
> time? So time to run goes from M to M/N mas o menos.

The reason would be that the loop might have side effects, and said side
effects might impact subsequent iterations. This is one of the reason
why languages like Haskell make the side effects clear. This allows you
to do things like "compute all the non-side effect bits in parallel and
then serialize the side effect bits", which you know is computationally
equivalent to doing the whole thing sequentially.

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to