I have a python list of lists which has around 10000000 rows and each row has 8 elements. I have noticed that iterating through this list and processing them is painfully slow. Somewhere in the program I also need to sort this list of lists using a specific key. I am using this in a System with 2gb RAM . What is the best way to do processing on such large lists??
EDIT
Lets assume data[] which has around 10000000 lists. I need to sort the data using each lists 0th element
So I am iterating through data as follows
for m in data:
and for sorting I am using
data=sorted(data, key=itemgetter(0))