Re: Speed query
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Speed query
- From: Tony Finch <dot@...>
- Date: 2008年3月27日 11:36:23 +0000
On 2008年3月26日, Javier Guerra wrote:
>
> but also noted that your speed test of the sort()ed queue just inserts
> numbers in the queue, while the heap uses a {key,value} table for each
> item... no fair!
You could avoid this by storing all the keys and values in one table and
the ordering in another, i.e.
pairs[key] = value
index[n] = key
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
CROMARTY FORTH TYNE: CYCLONIC 4 OR 5, BECOMING SOUTHEAST 5 TO 7 LATER.
MODERATE. SHOWERS. MODERATE OR GOOD.