A python and rust implementation of calculating "shanten number" in Japanese mahjong, only for flush hand
git clone --recursive https://github.com/habara-k/flush-shanten.git
cd flush-shanten
mkdir build
cd build
cmake ..
make
python3 ../shanten.py
rustc -C opt-level=3 -C debug_assertions=no ../shanten.rs
./shanten
./verify
Using 3.2GHz CPU and 8GB RAM,
shanten.py
: 42±1 secshanten.rs
: 2.15±0.08 sec