Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For large collections of homogenous values, using the array or struct modules is best for memory (and often for speed as well).

Or if math is needed, then numpy arrays are best.

Storing homogenous data in lists/tuples is fine if performance/memusage is not critical, or for small collections (i.e., 90% of use-cases).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: