Shop Learn P1 Docs P2 Docs
P2LLVM Benchmarking — Parallax Forums

P2LLVM Benchmarking

(branching off discussion from to discuss p2llvm performance)

I ran fftbench.c from and got the following results:

fft_bench v1.2
OpenMP not available on this system
Freq.    Magnitude
00000000 000001fe
000000c0 000001ff
00000140 000001ff
00000200 000001ff
1024 point bit-reversal and butterfly run time = 14531 us

Run at 180MHz. Total code size is 20828 bytes, actual fftbench.c is 1868 bytes (the rest is library code)

Comparing to the results from here, performance seems pretty good. Are there other benchmarks people would want to see?

Compile command:

/opt/p2llvm/bin/clang --target=p2 -Dprintf=__simple_printf -Oz -o fftbench.elf fftbench.c

I made minor tweaks to fftbench.c for starting up the code/printing (specific to p2llvm), attached.


  • There's a Rust version in that FFT repo... I did not know that. Someone really needs to get a start on making rust work with p2llvm :smiley:

  • I've been told that a few times. :smile: I don't know rust unfortunately, I'll learn it one day, but I'm hoping it's pretty straightforward to add support. And someone would need to write a runtime library in rust, too.

  • Seems straight forward enough....

    Hmmm....... I might have to poke at this over the weekend.

    If/when we get Rust working, I will gladly volunteer to start writing a runtime library in Rust.

Sign In or Register to comment.