2011/8/30 stefan brunthaler <ste...@brunthaler.net> > Yes, indeed I have a more straightforward instruction format to allow > for more efficient decoding. Just going from bytecode size to > word-code size without changing the instruction format is going to > require 8 (or word-size) times more memory on a 64bit system. From an > optimization perspective, the irregular instruction format was the > biggest problem, because checking for HAS_ARG is always on the fast > path and mostly unpredictable. Hence, I chose to extend the > instruction format to have word-size and use the additional space to > have the upper half be used for the argument and the lower half for > the actual opcode. Encoding is more efficient, and *not* more complex. > Using profiling to indicate what code is hot, I don't waste too much > memory on encoding this regular instruction format. > > Regards, > --stefan > That seems exactly the WPython approach, albeit I used the new "wordcode" in place of the old bytecode. Take a look at it. ;)
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