Re: [Python-Dev] Nuking wstr [Re: How can we use 48bit pointer safely?]

2018年4月01日 23:37:41 -0700

>
> 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 <[email protected]>
_______________________________________________
Python-Dev mailing list
[email protected]
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