Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bluecalm
on Dec 20, 2014
|
parent
|
context
|
favorite
| on:
ARMv7 vs. x86-64: Pathfinding benchmark of C++, D,...
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
on Dec 20, 2014
[–]
It'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
on Dec 20, 2014
|
parent
[–]
When visited was changed from a vector<bool> to a bitset<T>, why is it not passed by reference anymore?
pbsd
on Dec 20, 2014
|
root
|
parent
[–]
The 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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: