[Python-ideas] Associative arrays in hardware
Neil Toronto
ntoronto at cs.byu.edu
Tue Apr 15 07:24:26 CEST 2008
Full-on associative memory wouldn't be necessary. If there were a
machine-level instruction in current chips that did a dict-style lookup
almost as fast as a base+index*size, Python could *scream*. It might
work like 80x86's lea (load effective address):
hashaddr base, recsize, dictsize, value, destreg
It would be very CISCy, and there are a whole host of practical problems
dealing with hashing functions, good collision resolution, etc. But any
pointer/index-based (e.g. interned string) lookup could go almost as
fast as C++'s "this->". Mainstream is moving toward dynamic languages,
and it makes sense to support that in hardware.
Heck, I hear routers and switches already have things like this. Does
anybody have the ear of an Intel chip designer?
Neil
More information about the Python-ideas
mailing list