circuitpython/unix
Damien George 7ee91cf861 py: Add option to cache map lookup results in bytecode.
This is a simple optimisation inspired by JITing technology: we cache in
the bytecode (using 1 byte) the offset of the last successful lookup in
a map. This allows us next time round to check in that location in the
hash table (mp_map_t) for the desired entry, and if it's there use that
entry straight away.  Otherwise fallback to a normal map lookup.

Works for LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR and STORE_ATTR opcodes.

On a few tests it gives >90% cache hit and greatly improves speed of
code.

Disabled by default.  Enabled for unix and stmhal ports.
2015-01-07 21:07:23 +00:00
..
.gitignore Revamp qstrs: they now include length and hash. 2014-01-21 21:40:13 +00:00
Makefile unix: Enable -fno-crossjumping for fast build. 2015-01-03 21:15:02 +02:00
alloc.c Code style/whitespace cleanup; remove obsolete headers. 2014-09-03 22:47:23 +01:00
file.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
gccollect.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
input.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
input.h Add input command for unix 2014-05-07 07:19:51 -07:00
main.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
modffi.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
modos.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
modsocket.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
modtermios.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
modtime.c unix: Prefix includes with py/; remove need for -I../py. 2015-01-01 20:40:19 +00:00
mpconfigport.h py: Add option to cache map lookup results in bytecode. 2015-01-07 21:07:23 +00:00
mpconfigport.mk modtermios: Add "termios" unix module, subset of CPython's. 2014-08-23 06:09:46 +03:00
mpconfigport_fast.h unix: fast: Set initial module dict size big to have high pystone score. 2014-11-05 00:30:21 +02:00
qstrdefsport.h py: Allow to properly disable builtin "set" object. 2014-12-27 17:33:30 +00:00
seg_helpers.c unix: Create __bss_start and _end symbols for Mach-O targets. 2014-05-12 00:13:10 +02:00