3 ms·
Obligatory question: what compiler options did you use for c++? Good first try is -o3 -march=native. It really makes huge difference in case of C/C++
by bluecalm 12y ago
Obligatory question: what compiler options did you use for c++? Good first try is -o3 -march=native. It really makes huge difference in case of C/C++
- logicchains 12y agoIt's in the makefile in that repo: g++ cpp.cpp -std=c++11 -Wall -O2 -march=native -o cpp I was originally using -O3 but then someone found that -O2 is actually faster in this case.
- vmarsy 12y agoWhen visited was changed from a vector<bool> to a bitset<T>, why is it not passed by reference anymore?
- pbsd 12y agoThe most common call in the benchmark is to `getLongestPath<16>`. Passing 16 bits by value is cheaper and easier for the compiler to optimize (i.e., no aliasing) than passing by reference. I'd expect graphs with many nodes to behave differently.