[Python-ideas] Type Hinting - Performance booster ?
solipsis at pitrou.net
Fri Dec 26 21:37:28 CET 2014
On Fri, 26 Dec 2014 14:03:42 -0600
Ron Adam <ron3200 at gmail.com> wrote:
> On 12/26/2014 11:13 AM, Antoine Pitrou wrote:
> > On Wed, 24 Dec 2014 13:04:01 -0600
> > Ron Adam<ron3200 at gmail.com> wrote:
> >> >
> >> >My thoughts is that making python easier to multi-process on multi-core
> >> >CPUs will be where the biggest performance gains will be. Think of 100
> >> >core chips in as soon as 5 or 6 years.
> > Won't happen on mainstream computers
> > (laptop/desktop/tablet/smartphone), as it's a totally silly thing to
> > do there.
> Which is silly?, 100 cores,
> The 5 or 6 years figure is my optimistic expectation for high end
> workstations and servers.
I don't see how that's optimistic. Most workloads are intrinsically
serial, not parallel. Expecting to get a 100-core general purpose CPU
is expecting to get something that's unfit for most daily tasks, which
is rather pessimistic. If the industry had followed the enthusiastic
predictions from 5 years ago, the average desktop CPU would probably
have 16+ HW threads right now - which it doesn't: the average core count
stagnates between 2 and 4.
Sure, some specific workloads in scientific computing may benefit -
but if I understand correctly you can already release the GIL using
Cython, and perhaps soon using Numba.
Besides the serial nature of most workloads, there are other limits to
multicore scalability, such as DRAM access latency and bandwidth.
There's little point in having 100 CPU cores if they all compete for
memory access as executing multiple threads simultaneously reduces the
locality of accesses and therefore the efficiency of on-chip caches.
More information about the Python-ideas