2010/1/29 Antoine Pitrou <solip...@pitrou.net> > Actually, "wordcode" could allow accesses in the eval loop to be done on > aligned words, so as to fetch operands in one step on little-endian CPUs > (instead of recombining bytes manually). > > Regards > > Antoine. >
I think that big-endians CPUs can get benefits too, since a single word load operation is needed, followed by an instruction such as ROL #8 to "adjust" the result (supposing that the compiler is smart enough to recognize the pattern). Using bytecodes, two loads are needed to retrieve the two bytes, and some SHIFT & OR instructions to combine them getting the correct word. Loads are generally more expensive / limited. All that not counting the operations needed to advance the instruction pointer. Regards, Cesare
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com