Re: Performance ordered dictionary vs normal dictionary

Discussion in 'Python' started by Chris Rebert, Jul 29, 2010.

  1. Chris Rebert

    Chris Rebert Guest

    On Wed, Jul 28, 2010 at 8:12 PM, Navkirat Singh <> 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?)

    Cheers,
    Chris
    --
    http://blog.rebertia.com
    Chris Rebert, Jul 29, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leif K-Brooks

    Ordered dictionary?

    Leif K-Brooks, Jan 22, 2004, in forum: Python
    Replies:
    13
    Views:
    755
    David M. Wilson
    Jan 23, 2004
  2. Tom Anderson
    Replies:
    0
    Views:
    309
    Tom Anderson
    Nov 26, 2005
  3. pyGuy
    Replies:
    2
    Views:
    291
    pyGuy
    Apr 12, 2006
  4. Navkirat Singh
    Replies:
    6
    Views:
    2,974
    Navkirat Singh
    Jul 29, 2010
  5. DL

    Ordered list inside ordered list

    DL, Nov 9, 2009, in forum: Javascript
    Replies:
    6
    Views:
    307
    Dr J R Stockton
    Nov 21, 2009
Loading...

Share This Page