2 ms·
I would expect that for a vector of things in Python, iteration would be fastest. The array is in memory, right there. Spooling up a series of parallel threads
by kabdib 12y ago
I would expect that for a vector of things in Python, iteration would be fastest. The array is in memory, right there. Spooling up a series of parallel threads (and in Python, establishing the right locking, whatever that is...) just to distribute a bunch of ADD operations seems like a waste of time.
If the problem domain is indeed massive and needs to be parallel, okay. But the introduction was about doing some simple image processing, so the direction that this guy took with parallelism surprised me.
I wouldn't call this a waste of time (I learned some more Python, which is nice). But I think I would have had this done in a minute or two and moved on.