Heap reviews

RSS | Module Info

Heap (0.50) **

Well-documented, with a complete interface, but I can't recommend it because:

1 - At least to me, it's too awkward to use. From the doc:

use Heap::Elem::Num(NumElem);

foreach $i ( 1..100 ) {

$elem = NumElem( $i );

$heap->add( $elem );

2 - Its implicit performance claims are misleading -- while Fibonacci heaps
are fast asymptotically, they are so complex that even in C, you are better
off with a normal heap for moderate amounts of data. A pure Perl
implementation of a Fibonacci heap isn't all that useful -- it's likely to be
slower than using Perl's pure-C sort builtin.

If I needed a Heap module off CPAN, I'd use Ton Hospel's Heap::Simple.


Heap (0.50) ****

I like it, but it is missing some small nice touches which would make it great.