Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Queues - Is Infinity all right?

Thread Tools

Re: Queues - Is Infinity all right?

Rob Hunter
Posts: n/a

On Sunday, October 5, 2003, at 09:53 PM, Jeremy Fincher wrote:

> Rob Hunter <(E-Mail Removed)> wrote in message
> news:<(E-Mail Removed)>...
>> But it doesn't depend on such things. There is no cost. Check out
>> the
>> source code if you like. On my computer it's in /usr/lib/python<some
>> version>/

> That's where your wrong. list.pop(0) is an O(n) operation.

And this O(n) operation is used no matter is a bound was chosen for the
queue size, or not.

Several people seemed to interpret the original question as, "What is
the running time of the queue operations when there is an infinite
bound on the size given?" I interpreted the original question to be,
"Is anything saved, in terms of running time, by choosing some
particular queue size bound instead of leaving the it unbounded?" And
for that the answer is "No". Agreed?

Above, when I wrote, "There is no cost", I should have written "There
is no cost difference". But


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinity + Infinity (or NegInfinity - NegInfinity) Skybuck Flying C Programming 40 01-25-2012 12:25 AM
Infinity and -Infinity Jon A. Lambert Ruby 3 11-06-2005 04:46 AM
Start and stop AIX print queues from a web page? Perl 0 02-28-2005 04:45 PM
Queues - Is Infinity all right? Anand Pillai Python 9 10-08-2003 03:46 AM
Re: Queues - Is Infinity all right? Rob Hunter Python 1 10-06-2003 01:53 AM