fastest data structure for retrieving objects identified by (x, y) tuple?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Oct 4 10:04:21 EDT 2012


On Thu, 04 Oct 2012 08:21:13 -0400, Benjamin Jessup wrote:

> On 10/4/2012 12:20 AM, python-list-request at python.org wrote:
>> How do you know that?
>>
>> No offence, but if you can't even work out whether lookups in a dict or
>> a list are faster, I can't imagine why you think you can intuit what
>> the fastest way to retrieve the nearest neighbours would be.
> 
> Whats wrong with the test below?
[snip code]


I don't know. Is this a trick question? Is the answer, "nothing is wrong"?

It doesn't seem to be very useful code, but since I don't know what you 
think you are testing, I can't tell you whether you are doing it wrong or 
not.



-- 
Steven



More information about the Python-list mailing list