data structures - Filtering / iterating through very large lists in python -


if have list 10 million objects, how filter list quickly. takes 4-5 seconds complete iteration thru list comprehension. there efficient data structures or libraries in python? or python not suited large sets of data?

itertools designed efficient looping. particularly, might find ifilter suits purpose. iterating through large data structures expensive, if need of data @ time lazy evaluation can lot.

you can try using generator expressions, identical list comprehension counterparts (though usage can different) or generator, have benefits of lazy evaluation.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -