Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re3: Heap sorting in perl

by blakem (Monsignor)
on Apr 06, 2003 at 08:37 UTC ( #248411=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: Heap sorting in perl
in thread Heap sorting in perl

Letting the datbase do the sort is a good approach, but I was hoping for a more general, memory efficient solution that allows for arbitrary perl comparison routines.

Its a common enough situation that I would like to create a subroutine that returns the rows I want and takes a database handle, a sorting coderef, M, and an optional offset. I'm envisioning something like:

my $sortedrows = db_heap_sort($dbh, $coderef, $M, $offset);
The question is, is there a perl heap implementation that would be suitable for implementing the above sub. seems like the obvious choice, but I have doubts about its current status.

I have emailed the author, and will follow up with any new information I find out.


Comment on Re3: Heap sorting in perl
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://248411]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2015-12-01 10:17 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (798 votes), past polls