>
> Of course, the question is whether all this matters.  Is it important
> to save 8 bytes on each unicode object?  Only testing would tell.
>

Last year, I tried to profile memory usage of web application in my company.

https://gist.github.com/methane/ce723adb9a4d32d32dc7525b738d3c31#investigating-overall-memory-usage

Without -OO option, str is the most memory eater and average size is
about 109bytes.
(Note: SQLAlchemy uses docstring very heavily).

With -OO option, str is the third memory eater, and average size was
about 73bytes.

So I think 8bytes for each string object is not negligible.

But, of course, it's vary according to applications and libraries.

-- 
INADA Naoki  <songofaca...@gmail.com>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to