[Python-ideas] Type Hinting - Performance booster ?

Steven D'Aprano steve at pearwood.info
Sat Dec 27 03:43:03 CET 2014

On Sat, Dec 27, 2014 at 01:54:02AM +0000, Sturla Molden wrote:
> Antoine Pitrou <solipsis at pitrou.net> wrote:
> > I don't see how that's optimistic. Most workloads are intrinsically
> > serial, not parallel. 
> Computer graphics is intrinsically data-parallel, hence the GPU. A computer
> with a 128 core CPU would have no use for a GPU. 

Or, to put it another way, a computer with a GPU has no need for a 128 
core CPU.

I think it is more likely that general purpose desktop computers will 
start using GPUs than that they will start using 100+ core CPUs.

Apart from graphics, and some "embarrassingly parallel" tasks, most 
tasks are inherently serial. E.g. it takes 9 months to make a baby, you 
can't do it in 1 month by using 9 women or 100 chickens.

Even those which aren't inherently serial usually have some serial 
components, and Amadahl's Law puts an upper bound on how much of a 
performance increase you can get by parallising it:


I expect that the number of cores used by general purpose desktops will 
increase very slowly. It makes sense for servers to use as many cores as 
possible, since they typically run many CPU-bound tasks in parallel, but 
that doesn't apply so much to desktops and it certainly doesn't apply to 
wearable computers. The idea of a wearable computer using a 
general-purpose CPU with 100 cores strikes me as sheer fantasy: most of 
the cores will be idling all of the time, the effect on battery life 
will be terrible, and the heat generated prohibitive.

TL;DR I expect that two or four cores will remain standard for desktop 
computers for a long time, and one core machines will still be around 
for a while. Massively parallel computing will remain niche, the GIL is 
not really the bottleneck some people think it is, and when it is a 
bottleneck, existing ways of working around it are still very effective.


More information about the Python-ideas mailing list