<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On 21 Oct 2012, at 15:14, Pradipto Banerjee <<a href="mailto:pradipto.banerjee@adainvestments.com">pradipto.banerjee@adainvestments.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div><span>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?</span><br><span></span><br></div></blockquote><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">Python 3.3 has changes to make string storage more efficient. See the whats new page.</div><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-text-size-adjust: none; "><a href="http://docs.python.org/py3k/whatsnew/3.3.html">http://docs.python.org/py3k/whatsnew/3.3.html</a> "more compact unicode strings".</span><br></div><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-text-size-adjust: none; "><br></span></div><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-text-size-adjust: none; ">Barry</span></div><blockquote type="cite"><div><span></span></div></blockquote></body></html>