Slashdot
Follow
Adafruit's New CircuitPython 'Turbo' Brings Native Code To Tiny Boards
Adafruit released CircuitPython in 2017 as a beginner-friendly derivative of MicroPython. Adafruit has now introduced CircuitPython Turbo, a new workflow that compiles specific Python functions into native machine code. This compiled code is then loaded onto compatible microcontroller boards for faster execution. CircuitPython Turbo builds upon MicroPython's existing Native and Viper emitters to achieve significant speed improvements. For instance, a Mandelbrot test on a Metro RP2040 showed a 19.71x speedup for computation compared to bytecode. While the compiled functions run natively, the rest of the application remains in Python. This Turbo feature is now integrated into the latest CircuitPython builds for RP2040 and RP2350 boards. It is particularly beneficial for projects involving computationally intensive tasks like generating visual effects, processing audio, or handling complex calculations. CircuitPython Turbo aims to make projects smoother, more responsive, and capable of handling more tasks simultaneously. The speedups are specific to the measured computational parts of the application. This development is the result of collaborative efforts within the open-source community, building upon earlier advancements.