Rust is 3.2x faster than Moonbit if you don't handicap it - #15
Conversation
Dependency configuration issue - rustfft should be a dev dependency, not regular dependencyCategory |
|
Original benchmark was a 14" Macbook Pro w/ an M3 Pro. Latest benchmarks are 9800X3D / Ubuntu 25.04. |
Add tests the bounds-check factoring is faster if you pass target-cpu=native for auto-vectorization throw-away rayon version for giggles, 2-2.6x faster than single-threaded Rust, 6x faster than Moonbit
|
I've squashed my commits for a clean merge. |
|
One thing I want to note is that I was very conscious of not making the Rust implementation dissimilar to the other implementations. Things I didn't do but could've and might've in a production implementation:
NTT specific:
|
|
I don't understand why a new programming language wouldn't focus on improving its ecosystem instead of raising competition. |
|
I suggest rewriting MoonBit version to use iterative approach as well. |
|
Would curious to see a C# implementation too, might look into it tonight |
|
|
lol |
This is improving the programming ecosystem, similar to how Rust improved it. 🙂 |
This looks sound. How can I replicate it to compare today's versions, please? |






I can make the Rust implementation faster again but I think this suffices. This took 5 minutes with GPT-5. I added a test against rustfft to verify the iterative cooley-tukey but didn't extensively verify otherwise.