boostorg / graph

Boost.org graph module

Home Page:http://boost.org/libs/graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve dijkstra heap performance test

hdu-sdlzx opened this issue · comments

In dijkstra_heap_performance.cpp we have:

std::cout << boost::timer::format(relaxed_heap_time) << " seconds.\n"
          << "Speedup = " << (binary_heap_time.user / relaxed_heap_time.user)
          << ".\n";

On my x86 computer, the user time is 0.000 as the random graph is rather small.

[ 298s] ====== BEGIN OUTPUT ======
[ 298s] Generating graph...10000 vertices, 100000 edges.
[ 298s] Running Dijkstra's with binary heap... 0.003279s wall, 0.000000s user + 0.000000s system = 0.000000s CPU (n/a%)
[ 298s] seconds.
[ 298s] Running Dijkstra's with d-ary heap (d=4)...
[ 298s] EXIT STATUS: 136
[ 298s] ====== END OUTPUT ======

So maybe we should generate a larger graph to test, or just delete the speedup output?
BTW, will anyone check the speedup manually?

Even though the year-on-year increase in single-threaded CPU speed dropped off since this benchmark was written in 2004, 18 years is certainly long enough to render most benchmark data set sizes invalid. We could simply increase the size to match today's CPU speed, but that will just become invalid again in the future. What it should do is keep doubling the size until the measured speed is non-zero. That way it will also work efficiently when someone does something unusual and runs it on a simulated or ancient CPU, etc.

Is this benchmark run automatically as part of the tests? I hope not, I think it should be a convenience utility that someone can run if they are interested in it.

Is this benchmark run automatically as part of the tests? I hope not, I think it should be a convenience utility that someone can run if they are interested in it.

It is listed in test/Jamfile.v2 just like other testcases and I've created a PR to comment out this test.
Do we have other performance tests?

Thanks. I'm not sure, I would have to look.