pozorvlak/Benchmark-PriorityQueue — pull request #1 by arc (2011-12-29 18:26:18+00:00)
Title: Better comparison output

Aside from a bugfix and several small refactors, the big change here is the new program `bin/cmp_pq`. It's a little like `bin/bench_pq`, but it uses the `cmpthese` function from `Benchmark` to get better output, along these lines (truncated):

$ bin/cmp_pq -i -3
D:PQ:SB = Data::PrioQ::SkewBinomial
H:PQ = Hash::PriorityQueue
H:P = Heap::Priority
L:P = List::Priority
L:PQ = List::PriorityQueue
P:Q:A = POE::Queue::Array
P:X:Q:A = POE::XS::Queue::Array

Running ordered_insert on 7 modules, n=1000 .......
Rate P:X:Q:A P:Q:A L:PQ D:PQ:SB H:PQ H:P L:P
P:X:Q:A 15.5/s -- -41% -60% -79% -91% -95% -96%
P:Q:A 26.3/s 69% -- -33% -64% -85% -92% -93%
L:PQ 39.0/s 151% 49% -- -47% -77% -88% -89%
D:PQ:SB 73.7/s 374% 180% 89% -- -57% -78% -80%
H:PQ 172/s 1008% 555% 341% 134% -- -48% -52%
H:P 329/s 2019% 1153% 743% 347% 91% -- -9%
L:P 361/s 2224% 1274% 825% 390% 110% 10% --

You may not want to accept that as-is; it seems to me that it ought to be possible to combine `bin/cmp_pq` and `bin/bench_pq` into a single program, so perhaps you'd prefer that to be done first.