[Python-ideas] Save memory when forking with *really* immutable objects

Antoine Pitrou solipsis at pitrou.net
Tue Mar 13 12:09:18 CET 2012


On Mon, 12 Mar 2012 17:10:28 -0700
Larry Hastings <larry at hastings.org> wrote:
> 
> Martin's statistics from writing the flexible string representation says 
> that for a toy Django app, memory consumption is mostly strings, and 
> most strings are short (< 16 or even < 8 bytes)... in other words, 
> identifiers.  So if you ran 100 toy Django instances it seems likely 
> this would help!

How many MB do you save on a real app, though?

By the way, "short strings are identifiers" is a fallacy.

> And no I haven't benchmarked it,

Well, you should.

Regards

Antoine.





More information about the Python-ideas mailing list