{"slug": "circuitpython-goes-turbo-with-precompiled-functions", "title": "CircuitPython Goes Turbo With Precompiled Functions", "summary": "Mikey Sklar released CircuitPython Turbo, a project built with help from Anthropic's Claude LLM that adds precompiled 'native' and 'viper' execution modes to CircuitPython, the Adafruit-focused fork of MicroPython. According to Adafruit's documentation, a Metro RP2040 running the Mandelbrot set ran 3x faster in native mode and 19.7 times faster in viper mode than normal Python bytecode, with viper delivering 20x to 70x speedups depending on the workload. CircuitPython previously ran only in interpreted mode, and the new modes mirror MicroPython's existing Viper compiler, though inline assembly remains absent.", "body_md": "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.\n\nThus 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.\n\nNow 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.\n\nLike 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.\n\nThe 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/)", "url": "https://wpnews.pro/news/circuitpython-goes-turbo-with-precompiled-functions", "canonical_source": "https://hackaday.com/2026/09/14/circuitpython-goes-turbo-with-precompiled-functions/", "published_at": "2026-09-14 08:00:18+00:00", "updated_at": "2026-09-14 09:08:26.694828+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["CircuitPython Turbo", "Mikey Sklar", "Anthropic", "Claude", "CircuitPython", "MicroPython", "Adafruit", "Metro RP2040"], "alternates": {"html": "https://wpnews.pro/news/circuitpython-goes-turbo-with-precompiled-functions", "markdown": "https://wpnews.pro/news/circuitpython-goes-turbo-with-precompiled-functions.md", "text": "https://wpnews.pro/news/circuitpython-goes-turbo-with-precompiled-functions.txt", "jsonld": "https://wpnews.pro/news/circuitpython-goes-turbo-with-precompiled-functions.jsonld"}}