I'm missing testing the different emitters as demonstrated here: https://www.kickstarter.com/projects/214379695/micro-python-... Not sure whether they're supported on all the architectures, though.
Benchmarking MicroPython
11–15 of 15 posts
Re: Benchmarking MicroPython
#12Generate 2000 random numbers and sorting them using bubble sort on 160Mhz 32bit mcu takes 80 seconds ? This is exactly why micropython is a toy.
Re: Benchmarking MicroPython
#13This should not be used to conclude on the viability of using MicroPython for numeric type tasks. For that one should at least take into account the following: Integers are much faster than floats (floats involve a pointer and a heap allocation, integers are stored in a single word/object). array.array is preferred over list for something like sort. Continuous memory representation of numbers versus general purpose l…
Re: Benchmarking MicroPython
#14Of course, you have to recompile your C every time it changes, which is annoying when you're used to the REPL workflow.
Re: Benchmarking MicroPython
#15This should not be used to conclude on the viability of using MicroPython for numeric type tasks. For that one should at least take into account the following: Integers are much faster than floats (floats involve a pointer and a heap allocation, integers are stored in a single word/object). array.array is preferred over list for something like sort. Continuous memory representation of numbers versus general purpose l…
Ok, you guys have successfully nerd sniped me this morning... Here some experiments showing the use of code emitter to speed this code up massively. Link to code: https://github.com/jonnor/embeddedml/tree/master/handson/mic... The results on ESP32S3 (M5Stick AtomS3U), running MicroPython 1.24.1. All times in seconds, for the 2000 number sort. bubble.py 19.119 bubble_native.py 9.482 bubble_viper.py 0.904 heapsort_vipe…