> As you say, LOAD_FAST is a very frequently occuring instruction, both > statically and dynamically. Reducing it from a 3 byte instruction to a 1 > byte instruction in 97% of (static) cases should be an overall good. > > Most of the opcodes I proposed could be added without disturbing > locality of reference. > > e.g. > > switch (op = *p++) { > ... > case LOAD_FAST: > index = (*p++) + (*p++)<<8 > goto LOAD_FAST_MAIN; > break; > case LOAD_FAST_0: > case LOAD_FAST_1: > case LOAD_FAST_15: > index = op - LOAD_FAST_0 > LOAD_FAST_MAIN: > ... > break; > > > } Good idea. Can you benchmark this? --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4