Re: On benchmarks, heaps, priority queues

2005-01-27 Thread aaronwmail-usenet
re http://xsdb.sourceforge.net/bench/pq3.py Tim Peters: > If you repair that, and > instrument mixBench() to keep track of queue size statistics, you'll > find that even at 100, the queue at the top of the loop never > exceeds 30 entries, and has a mean size less than 3. Aha. Now that is emb

Re: On benchmarks, heaps, priority queues

2005-01-27 Thread Tim Peters
[EMAIL PROTECTED], on ] > Yes I know in theory the insertion sort approach should be bad for > large enough values, but the weird thing is that if you mix inserts and > deletes (with enough deletes) even 1M elements is not a large enough > value. Anyway,

Re: On benchmarks, heaps, priority queues

2005-01-27 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Hypothetical performance improvements are the root of all evil. > -- Bill Tutt (paraphrased) well, after this week, I'd say that Hypothetical performance limitations are the root of all evil. -- http://mail.python.org/mailman/listinfo/python-list

Re: On benchmarks, heaps, priority queues

2005-01-27 Thread aaronwmail-usenet
(re: http://xsdb.sourceforge.net/bench/pq3.py) nsz> ...bisect is not so fast for large data... Yes I know in theory the insertion sort approach should be bad for large enough values, but the weird thing is that if you mix inserts and deletes (with enough deletes) even 1M elements is not a large

Re: On benchmarks, heaps, priority queues

2005-01-27 Thread Szabolcs Nagy
hello nice benchmarks some time ago i've also done some benchmarking i sorted 10 random int with differrent heap implementations, bisect module and with list.sort() I know that heaps are not for sorting, but i tested their performance with sorting back then. my results (sorting algo / time):

Re: On benchmarks, heaps, priority queues

2005-01-27 Thread aaronwmail-usenet
me> PQPython23 - the Lib implementation me> PQ0 - my insertion sort based variant me> PQueue - my "heap" based variant me> (like PQPython23, but different). Tim D: > First of all, you should be running these benchmarks using Python 2.4. > heapq is considerably faster there ... (Raymond Hettinger

RE: On benchmarks, heaps, priority queues

2005-01-26 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > PQPython23 - the Lib implementation > PQ0 - my insertion sort based variant > PQueue - my "heap" based variant > (like PQPython23, but different). First of all, you should be running these benchmarks using Python 2.4. heapq is considerably faster there ... (Raymond Hett

On benchmarks, heaps, priority queues

2005-01-26 Thread aaronwmail-usenet
I've been wondering about benchmarks recently. What is a fair benchmark? How should benchmarks be vetted or judged? I decided to see what you folks thought, so for discussion I compared two priority queue implementations I published for Python in 1995 against the "heap" priority queue implementa