P2LLVM Benchmarking
(branching off discussion from https://forums.parallax.com/discussion/comment/1533281 to discuss p2llvm performance)
I ran fftbench.c from https://github.com/ZiCog/fftbench/blob/master/fftbench.c 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.
c
17K
Comments
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
I've been told that a few times. 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.... https://rustc-dev-guide.rust-lang.org/building/new-target.html
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.