Pythoniac: Thoughts on a hardware Python processor

Oren Tirosh oren-py-l at hishome.net
Thu Jun 27 03:32:29 EDT 2002


On Wed, Jun 26, 2002 at 10:29:52AM +0000, Christopher Saunter wrote:
> Dear All,
> 
> I have seen the occasional post about creating a specific hardware 'Python
> Processor', that could then be built and used in programmable logic or the
> like (Valves, relays, core memory - Pythoniac ;-) - in other words, create
> a processor that executes Python bytecode directly.  There would be
> various different reasons for doing this (the 'neat' factor etc...)  

One of the most effective optimizations for such a machine would be to 
support compact objects.  The machine word would be somewhat larger than the 
actual address space. Let's say 40 bits.  If the 4 high bits are 0 this is a
reference to an object allocated somewhere in memory.  If the high bits are 
not zero it means that the actual object is stored inside the register.  You 
have 15 types that can bypass allocation, deallocation, reference counting, 
etc. The most important compact type is int, of course.  Python floats are 
64 bits so if you want them to be compact objects, too, the machine word
would need to be 64+ bits.

Another important hardware feature is accelerated associative lookup.

	Oren






More information about the Python-list mailing list