-
Hi, what my test above shown on the pico with some floats at least for pi computation, is:
- uncompiled and not pretokenised: 446 s
- compiled (84 MHz) : 36 s as opposed to ThomasChr result of 28 s on the pyboard (168 MHz)
I did not tried the tokenised functionnality.
Results are indeed in favor of Espruino Pico as it is only 84 MHz clocked.This test could be rerun on Espruino Pico reflashed with Micropython as it has been ported to.
Porting Espruino to the Pyboard would eventually and symetricaly allow this comparison running on the Pyboard too
That would definitly be fair. - uncompiled and not pretokenised: 446 s
Yes - the Python interpreter in the Pyboard is significantly faster - Espruino was designed for much more constrained devices, so cares more bout memory usage and less about outright speed.
You're seeing a whole bunch of differences here...
E.setFlags({pretokenise:1})
at the start of your code to give you a bit of a speed boost though.@asez using compiled code, all integer code will be very fast - however for floating point it falls back to Espruino's built-in maths library (because of the hassle of linking in all the double maths functions), so it'll suffer a performance hit too.
However it looks like clock-for-clock JS code with the compiled directive is still faster than standard MicroPython, which I'm pretty happy about. If you did a purely integer benchmark I imagine compiled JS would give you some really impressive figures.