remix logo

Hacker Remix

Performance of popular microcontroller boards running uLisp

60 points by tosh 3 days ago | 14 comments

frozenwind 1 day ago

I don't think I will ever use Lisp but I love the way this site documents different examples with all kinds of hardware. I wish there were more sites like these for other microcontroller/SoC languages like lua, mPython, Arduino derived boards etc.

regularfry 1 day ago

If you're wondering why the Teensy does so well (as I was), it's because the core is running at four times the clock rate of the nearest comparator.

magicalhippo 1 day ago

It's also sporting a much more advanced ARM core[1], Cortex-M7, compared to most of the other ARM boards which had Cortex-M0(+) cores.

The M7 supports cache unlike the M0(+), and the processor used[2] has 64kB of it, split evenly into instruction and data cache. It also supports branch speculation which the M0(+) does not.

While the Teensy has 4.5x the clock frequency of the Pico 1, the Teensy is 8x faster.

Main outlier is the Pico 2 with a Cortex-M33, though still at a reduced clockspeed compared to the Teensy. From what I can see[3] it does not have cache for its on-board memory, "just" branch speculation like the M7.

[1]: https://en.wikipedia.org/wiki/ARM_Cortex-M

[2]: https://www.nxp.com/part/MIMXRT1062DVL6A

[3]: https://datasheets.raspberrypi.com/rp2350/rp2350-product-bri...

weinzierl 1 day ago

If you compare it to the only other board in the table with more than 300 MHz (and the only RISC-V) you can see that Teensy outperforms it by a margin even when the results are scaled by clock speed.

Of course it would only be a complete picture taking power consumption into consideration.

johnsondavies 1 day ago

Good idea - I'll add a column to the tables giving the current consumption for each board.

magicalhippo 1 day ago

Given that it seems one can overclock[1] the RP2350 to 600MHz, it would be interesting to compare it to the Teensy at same frequency.

[1]: https://forums.raspberrypi.com/viewtopic.php?t=375975

Neywiny 1 day ago

Also the M7 is a superscaler. It's not mentioned often, but if the task allows it, you can use what's essentially 1.5x the execution units of the smaller cores. It's not a complete 2x, but I'm sure it helps.

zimpenfish 1 day ago

As far as I'm aware, the ESP32C3 is RISC-V - should it belong in the RISC-V table?

johnsondavies 1 day ago

You're correct that the ESP32-C3 is based on a RISC-V processor, but it has more in common with the other ESP32 boards than it does with the boards supported by the RISC-V version of uLisp, so it made sense to support it with the ESP version of uLisp.

K0balt 1 day ago

I understand the appeal from a hobby perspective, but is there any advantageous use cases where it would make sense to choose uLisp over other more common solutions for microcontroller software development?

I think it’s cool, and I’ve played with it a bit, but aside from using it as a fidget spinner to explore lisp, I’m wondering if there are applications for the language that would provide an edge in actual use.

tyingq 1 day ago

Probably lower memory requirements compared to any other "not C or ASM" environment.

anthk 1 day ago

You can do basic Calculus with a single file used as a header.