Subsetting a dictionary
Aahz Maruch
aahz at panix.com
Mon Mar 19 15:48:24 EST 2001
In article <995jg8$k85$1 at newsg1.svr.pol.co.uk>,
Will Newton <will at nospam.misconception.org.uk> wrote:
>Aahz Maruch wrote:
>
>>>On average this makes the code ~10x slower. I haven't done an in depth
>>>analysis of how the routine is called, but my "backwards" way of doing
>>>things seems much faster for my task.
>>
>> While it's possible you're right, my gut instinct is that Emile's way
>> will be faster unless your subset almost always includes most of the
>> dictionary.
>
>I ran the profiles, trust me, my way is faster, just not fast enough. :)
But I don't know how you coded the build-a-dictionary approach,
therefore I don't know that you used an efficient mechanism to do your
profiling.
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het Pythonista http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
There's a difference between a person who gets shit zie doesn't deserve
and a person who gets more shit than zie deserves. --Aahz
More information about the Python-list
mailing list