CircuitPython 4.1.0 Review

By Ben Everard. Posted

The big feature of the free software, CircuitPython 4.1. is the speed. You can see the box below for more information on the benchmarks we ran but, in short, the new version is quite a bit quicker.

Basic operations, such as floating point and integer arithmetic, were about twice as fast, and it was particularly interesting to see that this performance improvement filtered all the way through to the devices controlled by the board.

We were able to flash NeoPixels at twice the rate using this firmware – we’re particularly pleased to see this, as we’ve run into performance issues running NeoPixel matrixes with CircuitPython in the past.

There are also big performance gains when controlling screens.

While the software has been moving along, so too has hardware support, and there’s now a greater range of supported hardware than ever before.

At the time of writing, there were 62 separate devices on the downloads page, so there’s a great selection to choose from, if you want to get developing with this language.

Ultimately, CircuitPython is never going to match the speed of a compiled language. The overheads of running an interpreter on a microcontroller are just too great.

However, most of the time, we’re using microcontrollers that are more powerful than we need, and these machines spend a significant proportion of their time waiting for things to happen.

Our code, then, just needs to be ‘fast enough’.

Earlier versions of CircuitPython were fast enough for some tasks, but it was quite common to hit issues – particularly when working with outputs such as LEDs and screens.

This new version means that there are even more areas that you can work with using CircuitPython.

We ran the same tests on a Circuit Playground Express, using both CircuitPython 4.0.1 and 4.1.0. These are the results (lower is better).

Verdict: 10 out of 10

Instantly double the speed of your microcontrollers? Yes please!

From HackSpace magazine store


Subscribe to our newsletter