in reply to Re: Re: Re: Re: looking for a Priority Queue
in thread looking for a Priority Queue
Had you PTFP, you might have realized that the link went nowhere -- at least it was a "not found" for me. You're right that I didn't read your code very carefully, but now that I have, I'm guessing it doesn't do what the original poster wanted. Or more accurately, your benchmark doesn't reflect its being used in the way he would use it, since it only uses a single priority. Try this instead:
/suse Priority; my $q = new Priority; my $time = time; $q->add(1,$_) for 1..1000000; $q->pop for 1..1000000; print "Did a million in ",time - $time, " seconds";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re: looking for a Priority Queue
by tachyon (Chancellor) on May 07, 2002 at 14:22 UTC | |
by educated_foo (Vicar) on May 07, 2002 at 16:08 UTC |