Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Performance ordered dictionary vs normal dictionary

Thread Tools

Re: Performance ordered dictionary vs normal dictionary

Chris Rebert
Posts: n/a
On Wed, Jul 28, 2010 at 8:12 PM, Navkirat Singh <(E-Mail Removed)> wrote:
> Sorry, I might have been a bit vague:
> (Also, I am new to pythong)
> I am trying to do construct my own web session tracking algorithm for a web
> server (which also I have constructed). The book keeping is for the session
> information I track. The dictionary object will do this for me. I was
> initially using a plain dictionary object, but I read this in the
> documentation that made me think about the question I asked :-

Does your program actually make use of the ordering? If so, then yes,
using OrderedDict is obviously preferable (Why reimplement something
needlessly?). If not, then why bother with the extra complication?

(You are aware that the "ordered" in OrderedDict means that its keys
are ordered, and not that, say, a list containing OrderedDicts can be
sorted, right?)

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
Performance ordered dictionary vs normal dictionary Navkirat Singh Python 6 07-29-2010 10:18 AM
Ordered list inside ordered list DL Javascript 6 11-21-2009 11:43 PM
Best way to emulate ordered dictionary (like in PHP)? pyGuy Python 2 04-12-2006 07:40 AM
Yet another ordered dictionary implementation Tom Anderson Python 0 11-26-2005 03:09 AM
Ordered dictionary? Leif K-Brooks Python 13 01-23-2004 11:46 PM