diff options
author | Damien George <damien.p.george@gmail.com> | 2018-09-14 13:39:17 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-09-14 13:39:17 +1000 |
commit | 9f241ef398cb0a7fbccc93b36a0fe032f89221e4 (patch) | |
tree | 2cad97a08e3860ca9dff1ff7ae3718a2f6bce616 /py/stackctrl.h | |
parent | 0f4d595bebb82cfdd6264e1d18455faa0502ff31 (diff) | |
download | micropython-9f241ef398cb0a7fbccc93b36a0fe032f89221e4.tar.gz micropython-9f241ef398cb0a7fbccc93b36a0fe032f89221e4.zip |
py: Optimise call to mp_arg_check_num by compressing fun signature.
With 5 arguments to mp_arg_check_num(), some architectures need to pass
values on the stack. So compressing n_args_min, n_args_max, takes_kw into
a single word and passing only 3 arguments makes the call more efficient,
because almost all calls to this function pass in constant values. Code
size is also reduced by a decent amount:
bare-arm: -116
minimal x86: -64
unix x64: -256
unix nanbox: -112
stm32: -324
cc3200: -192
esp8266: -192
esp32: -144
Diffstat (limited to 'py/stackctrl.h')
0 files changed, 0 insertions, 0 deletions