Tim> If I'm reading this right, then in the normal case of resolving Tim> "len" in Tim> def mylen(s): Tim> return len(s) ... Tim> Jeremy, can you do the same level of detail for your scheme? Skip? Yeah, it's TRACK_GLOBAL 'len' LOAD_FAST <len> LOAD_FAST <s> CALL_FUNCTION 1 UNTRACK_GLOBAL 'len' RETURN_VALUE or something similar. (Stuff in <...> represent array indexes.) My scheme makes update of my local copy of __builtins__.len the responsibility of the guy who changes the global copy. Most of the time this never changes, so as the number of accesses to len increase, the average time per lookup approaches that of a simple LOAD_FAST. Skip
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