Python CPU

John Nagle nagle at animats.com
Mon Apr 4 21:56:50 CEST 2011


On 4/4/2011 12:47 AM, Gregory Ewing wrote:
> John Nagle wrote:
>
>> A tagged machine might make Python faster. You could have
>> unboxed ints and floats, yet still allow values of other types,
>> with the hardware tagging helping with dispatch. But it probably
>> wouldn't help all that much. It didn't in the LISP machines.
>
> What might help more is having bytecodes that operate on
> arrays of unboxed types -- numpy acceleration in hardware.

     That sort of thing was popular in the era of the early
Cray machines.  Once superscalar CPUs were developed,
the overhead on tight inner loops went down, and several
iterations of a loop could be in the pipeline at one time,
if they didn't conflict.  Modern superscalar machines have
register renaming, so the same program-visible register on
two successive iterations can map to different registers within
the CPU, allowing two iterations of the same loop to execute
simultaneously.  This eliminates the need for loop unrolling and
Duff's device.

				John Nagle




More information about the Python-list mailing list