Performance of popular microcontroller boards running uLisp

(ulisp.com)

62 points | by tosh 9 months ago ago

18 comments

  • frozenwind 8 months 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 8 months 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 8 months 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 8 months 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.

      • Neywiny 8 months 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.

  • K0balt 8 months 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 8 months ago

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

      • K0balt 8 months ago

        That could be interesting in some cases.

    • anthk 8 months ago

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

      • K0balt 8 months ago

        A file? I’m not sure the context here ; we are talking about systems that in many cases do not have a file system?

  • anthk 8 months ago

    On the Mini text-adventure sample, I wonder if porting Malyon from Emacs' Elisp could be feasible, at least to run v3 Zmachine games, small enough to be fastly interpreted even under a C64.

    https://emacs.crys.site/interactive-fiction-malyon/

    The Sudoku example ran as-is under Common Lisp, maybe it's the same under Emacs.

    A libre v3 game to freely test it would be Calypso, among Tristam Island.

  • anthk 8 months ago

    This example in ANS Forth (restricted) interpreters gave me nightmares because I was dancing with the stack back and forth. No pun intended. With Lisp, it's a piece of cake.

    http://www.ulisp.com/show?1FHA

  • zimpenfish 8 months ago

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

    • johnsondavies 8 months 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.

  • 8 months ago
    [deleted]
  • 8 months ago
    [deleted]