micropython/stmhal
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
..
boards stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
cmsis
hal
usbdev
usbhost
.gitignore
Makefile stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
accel.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
accel.h
adc.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
adc.h
autoflash
bufhelper.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
bufhelper.h
can.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
can.h
dac.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
dac.h
diskio.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
extint.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
extint.h
ffconf.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
ffconf.h
file.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
file.h
flash.c
flash.h
font_petme128_8x8.h
fsusermount.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
fsusermount.h
gccollect.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
gccollect.h
gchelper.s
help.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
i2c.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
i2c.h
import.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
input.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
irq.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
irq.h
lcd.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
lcd.h
led.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
led.h
lexerfatfs.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
lexerfatfs.h
main.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
make-stmconst.py
memory.h
modnetwork.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modnetwork.h
modnwcc3k.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modnwwiznet5k.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modpyb.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modstm.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modstmconst.gen.c
moduos.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
moduselect.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modusocket.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modutime.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
mpconfigport.h py: Add option to cache map lookup results in bytecode. 2015-01-07 21:07:23 +00:00
mpconfigport.mk
mphal.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
mphal.h
pendsv.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
pendsv.h
pin.c teensy: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:13:30 +00:00
pin.h
pin_defs_stmhal.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
pin_defs_stmhal.h
pin_named_pins.c teensy: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:13:30 +00:00
portmodules.h
printf.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
pybcdc.inf_template
pybioctl.h
pybstdio.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
pybstdio.h
pyexec.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
pyexec.h
qstrdefsport.h
readline.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
readline.h
rng.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
rng.h
rtc.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
rtc.h
sdcard.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
sdcard.h
servo.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
servo.h
spi.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
spi.h
startup_stm32f40xx.s
std.h
stm32f4xx_it.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
stm32f4xx_it.h
stm32f405.ld
storage.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
storage.h
string0.c
system_stm32f4xx.c
systick.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
systick.h
timer.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
timer.h
uart.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
uart.h
usb.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
usb.h
usbd_cdc_interface.c
usbd_cdc_interface.h
usbd_conf.c
usbd_conf.h stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
usbd_desc.h
usbd_desc_cdc_msc.c
usbd_msc_storage.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
usbd_msc_storage.h
usrsw.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
usrsw.h