On 21 Oct 2012, at 15:14, Pradipto Banerjee 
<pradipto.baner...@adainvestments.com> wrote:

> I tried this on a different PC with 12 GB RAM. As expected, this time, 
> reading the data was no issue. I noticed that for large files, Python takes 
> up 2.5x size in memory compared to size on disk, for the case when each line 
> in the file is retained as a string within a Python list. As an anecdote, for 
> MATLAB, the similar overhead is 2x, slightly lower than Python, and each line 
> in the file was retained as string within a MATLAB cell. I'm curious, has any 
> one compared the overhead of data in memory for other languages like for 
> instance Ruby?
> 
Python 3.3 has changes to make string storage more efficient. See the whats new 
page.
http://docs.python.org/py3k/whatsnew/3.3.html "more compact unicode strings".

Barry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to