dual processor

Michael Sparks ms at cerenity.org
Wed Sep 7 21:55:02 CEST 2005

Thomas Bellman wrote:
> Michael Sparks <ms at cerenity.org> writes:
>> Similarly, from
>> a unix command line perspective, the following will automatically take
>> advantage of all the CPU's I have available:
>>    (find |while read i; do md5sum $i; done|cut -b-32) 2>/dev/null |sort
> No, it won't.  At the most, it will use four CPU:s for user code.

OK, maybe I should've been more precise. That said, the largest machine I
could potentially get access relatively easily to would be a quad CPU
machine so if I wanted to be be pedantic, regarding "*I* have available"
the idea stands. (Note I didn't say take /best/ advantage - that would
require rewriting all the indvidual parts of the pipeline above to be
structured in a similar manner or some other parallel approach)

You've essentially re-iterated my point though - that it naturally sorts
itself out, and does the best fit it can, which is better than none
(despite this being a naff example - as I mentioned).  Worst case, yes,
everything serialises itself.


More information about the Python-list mailing list