Teensy 4 is really really fast ! :-)

vindar

Well-known member
Hi,

I am currently designing a Rubik's cube solving robot (not very original I know :)). Anyway, I built a robot using a Pi-zero W but now I want something without the overhead of a full linux distro so this should be a perfect job for a Teensy 4.1... Therefore I ported kociemba's (beautiful) algorithm to Teensy 4.1.

The original code is here.

It turns out that the results are really impressive ! Solving a cube (in at most 24 moves) is about 25% faster on average on the Teensy 4.1 than it is on the Pi Zero with the same C code! Admittedly, I did try to optimize memory access for the moves cache tables on the teensy and not on the pi-zero and I am also running the teensy overclocked to 816mhz but it is still really impressive! That MCU is a beast :)

If anyone is interested, the port is available on github . The computation requires 4.3MB of flash memory to hold the pre-computed tables and, optionally, about 730Kb of RAM to improve cache access.
 
DMAMEM is just the other half of the 1024KB of RAM on the T_4.x. It is non contiguous so to make use of all RAM requires buffer in both free faster DTCM and the DMAMEM. In this case RAM between the two is 730KB.
 
Back
Top