Skip to content

Nugine/benchmark-fft

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFT Benchmark Project

A multi-language FFT (Fast Fourier Transform) performance benchmark comparing Rust, MoonBit, Swift, and Go implementations.

Features

  • Multi-language support: Rust, MoonBit, Swift, and Go implementations
  • Automated building: Auto-builds all language programs
  • Performance benchmarking: Runs multiple tests with statistical analysis
  • Result visualization: Generates performance comparison charts
  • Optional verification: MoonBit ↔ Rust result verification
  • Verbose logging: Optional detailed command execution logs

Requirements

This project has been tested on the following environments:

  • Python 3.13.7
  • Rust 1.89.0
  • MoonBit v0.6.25
  • Swift 6.0
  • go 1.22

Quick Start

# Basic benchmark (build + test)
python3 bench_runner.py

# Skip building (if already built)
python3 bench_runner.py --no-build

# Custom parameters
python3 bench_runner.py --runs 20 --inputs 16 18 20 24

# Enable verification
python3 bench_runner.py --verify --verbose

Examples

# Quick test (skip build, 5 runs)
python3 bench_runner.py --no-build --runs 5

# Detailed test (build all, 20 runs, enable verification)
python3 bench_runner.py --runs 20 --verify --verbose

# Custom input sizes
python3 bench_runner.py --inputs 16 18 20 22 24 --runs 15

Output

  • Build progress: Shows building status for each language
  • Test results: Statistical summary table with min/max/median/average times
  • Chart: Generates bench_avg.png performance comparison chart
  • Verification: Optional MoonBit ↔ Rust result verification

Default Settings

  • Input sizes: 18, 20, 22 (2^18, 2^20, 2^22 complex points)
  • Runs per input: 10
  • Verification: disabled by default
  • Chart output: bench_avg.png
  • Verification files: ./.verify_out/

Troubleshooting

  • Use --verbose for detailed error information
  • Ensure all language environments are properly installed
  • Check write permissions for verification directory

About

FFT benchmark to compare performance of MoonBit with other languages

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 48.0%
  • Rust 15.2%
  • Swift 14.5%
  • MoonBit 11.8%
  • Go 10.5%