performance question: dictionary or list, float or string?

bkamrani at bkamrani at
Tue Dec 2 12:41:29 CET 2008

Hi Python gurus!
I'm going to read in an Ascii file containing float numbers in rows
and columns (say 10 columns 500000 rows) for further numerical
process. Which format is best to save them in, eg, dictionary, list,
or numpy array when it comes to performance?

Will it be beneficial to convert all strings to float directly after
reading or it doesn't matter to save them as string and thereafter
when it comes to calculation convert them to floats?

Thank you!

More information about the Python-list mailing list