# CircuitPython Goes Turbo With Precompiled Functions

> Source: <https://hackaday.com/2026/09/14/circuitpython-goes-turbo-with-precompiled-functions/>
> Published: 2026-09-14 08:00:18+00:00

It would not be at all original to declare that Python is the new BASIC. Like BASIC, it has been the first programming language for a whole generation of coders, and its main advantage is that it’s quick and easy to write in. Like BASIC it is an interpreted language, and thus rather slow to execute.

Thus while CircuitPython can be very useful for beginners and quick projects, it hits the limitations of the hardware far sooner than it needs to — unless you can pre-compile critical parts of the code, which you now can, thanks to [CircuitPython Turbo](https://github.com/mikeysklar/turbo) by [Mikey Sklar] with some help from Anthropic’s Claude LLM.

Now if that sounds a lot like MicroPython’s ‘Viper’ and machine-code compiler, that’s because it is. CircuitPython is a fork of MicroPython with some handy extras on Adafruit boards, but Viper wasn’t one of them until now. Before the Turbo version, CircuitPython only ran in interpreted mode.

Like MicroPython, using CircuitPython Turbo you can flag sections to run as ‘native’, where instructions are compiled but values stay as python objects, which gets you about a 3X speedup. A little more rewriting to declare your variables and pointers and you can use ‘viper’ mode, which can — depending on what you’re up to — result in a 20x to 70x speedup. In [Adafruit’s documentation](https://learn.adafruit.com/circuitpython-turbo?view=all), they demonstrate a Metro RP2040 calculating the Mandelbrot set 3x faster in Native and 19.7 times faster with Viper than normal Python bytecode.

The one thing that we miss from BASIC that CircuitPython Turbo doesn’t give is inline assembly– though interestingly enough, that *is* in the upstream MicroPython implementation, so perhaps its day will come here too. Not every job is suited to the use of Python on microcontrollers, but we’ve seen it used for everything [from e-bikes](https://hackaday.com/2023/11/06/open-brain-surgery-for-ebikes-and-escooters/) to a [Winamp-inspired music player.](https://hackaday.com/2022/02/20/winamp-reborn-with-the-adafruit-pyportal/)
