3 ms·
When visited was changed from a vector<bool> to a bitset<T>, why is it not passed by reference anymore?
by vmarsy 12y ago
When 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.