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

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Oct 3 22:25:01 EDT 2012


On Thu, 04 Oct 2012 01:58:16 +0000, Steven D'Aprano wrote:

> adict: 24712
> alist: 23127324
[...]
> So in this situation, a list of lists uses about 100 times
> more memory than a dict, but look-ups are about 6% faster.

Correction: about 1000 times more memory. Sorry for the typo.



-- 
Steven



More information about the Python-list mailing list