[Python-ideas] solving multi-core Python
ncoghlan at gmail.com
Fri Jun 26 13:12:24 CEST 2015
On 26 Jun 2015 01:27, "Sturla Molden" <sturla.molden at gmail.com> wrote:
> On 25/06/15 16:31, Nick Coghlan wrote:
>> 3. The potential for collisions between objects means it isn't an
>> embarrassingly parallel problem where the different computational
>> threads can entirely ignore the existence of the other threads
> Well, you can have a loop that updates all particles, e.g. by calling a
coroutine associated with each particle, and then this loop is an
embarrassingly parallel problem. You don't need to associate each particle
with its own thread.
> It is bad to teach students to use one thread per particle anyway.
Suddenly they write a system that have thousands of threads.
And when they hit that scaling limit is when they should need to learn why
this simple approach doesn't scale very well, just as purely procedural
programming doesn't handle increasing structural complexity and just as the
"c10m" problem (like the "c10k" problem before it) is teaching our industry
as a whole some important lessons about scalable hardware and software
There are limits to the degree that education can be front loaded before
all the pre-emptive "you'll understand why this is important later"
concerns become a barrier to learning the fundamentals, rather than a
useful aid. Sometimes folks really do need to encounter a problem
themselves in order to appreciate the value of the more complex solutions
that make it possible to get past those barriers.
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas