-
- Downloads
tests: Add framework for comparative benchmarking.
Motivation is optimizing handling of various constructs as well as understanding which constructs are more efficient in MicroPython. More info: http://forum.micropython.org/viewtopic.php?f=3&t=77 Results are wildly unexpected. For example, "optimization" of range iteration into while loop makes it twice as slow. Generally, the more bytecodes, the slower the code.
Showing
- tests/bench/bench.py 10 additions, 0 deletionstests/bench/bench.py
- tests/bench/loop_count-1-range.py 7 additions, 0 deletionstests/bench/loop_count-1-range.py
- tests/bench/loop_count-2-range_iter.py 7 additions, 0 deletionstests/bench/loop_count-2-range_iter.py
- tests/bench/loop_count-3-while_up.py 8 additions, 0 deletionstests/bench/loop_count-3-while_up.py
- tests/bench/loop_count-4-while_down_gt.py 7 additions, 0 deletionstests/bench/loop_count-4-while_down_gt.py
- tests/bench/loop_count-5-while_down_ne.py 7 additions, 0 deletionstests/bench/loop_count-5-while_down_ne.py
- tests/bench/var-1-constant.py 8 additions, 0 deletionstests/bench/var-1-constant.py
- tests/bench/var-2-global.py 10 additions, 0 deletionstests/bench/var-2-global.py
- tests/bench/var-3-local.py 10 additions, 0 deletionstests/bench/var-3-local.py
- tests/bench/var-4-arg.py 9 additions, 0 deletionstests/bench/var-4-arg.py
- tests/run-bench-tests 97 additions, 0 deletionstests/run-bench-tests
tests/bench/bench.py
0 → 100644
tests/bench/loop_count-1-range.py
0 → 100644
tests/bench/loop_count-2-range_iter.py
0 → 100644
tests/bench/loop_count-3-while_up.py
0 → 100644
tests/bench/loop_count-4-while_down_gt.py
0 → 100644
tests/bench/loop_count-5-while_down_ne.py
0 → 100644
tests/bench/var-1-constant.py
0 → 100644
tests/bench/var-2-global.py
0 → 100644
tests/bench/var-3-local.py
0 → 100644
tests/bench/var-4-arg.py
0 → 100644
tests/run-bench-tests
0 → 100755
Please register or sign in to comment