Skip to content

Optimize nqueens c++ with std::bitset

schorsch1976 requested to merge schorsch1976/nqueens:main into main

With this Merge request the benchmark looks like this on my machine (AMD Ryzen 7 3700X 8-Core Processor)

georg@hammerhead:/tmp/nqueens/c++$ time ./run.sh 16 Solving: n=16 Result: 14772512

real 0m53,031s user 0m52,978s sys 0m0,012s georg@hammerhead:/tmp/nqueens/c++$ cd ../c georg@hammerhead:/tmp/nqueens/c$ time ./run.sh 16 Solving: n=16 Result: 14772512

real 0m56,884s user 0m56,872s sys 0m0,004s

Merge request reports

Loading