[Python-checkins] peps: Add memory consumption table.

martin.v.loewis python-checkins at python.org
Sun Aug 28 20:13:11 CEST 2011


http://hg.python.org/peps/rev/1354ff99e324
changeset: 3934:1354ff99e324
user: Martin v. Löwis <martin at v.loewis.de>
date: Sun Aug 28 20:12:38 2011 +0200
summary:
 Add memory consumption table.
files:
 pep-0393.txt | 36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/pep-0393.txt b/pep-0393.txt
--- a/pep-0393.txt
+++ b/pep-0393.txt
@@ -226,6 +226,42 @@
 PEP; applications that use them will see a performance penalty,
 though. Future versions of Python may consider to remove them.
 
+Performance
+-----------
+
+Performance of this patch must be considered for both memory
+consumption and runtime efficiency. For memory consumption, the
+expectation is that applications that have many large strings will see
+a reduction in memory usage. For small strings, the effects depend on
+the pointer size of the system, and the size of the Py_UNICODE/wchar_t
+type. The following table demonstrates this for various small string
+sizes and platforms.
+
++-------+---------------------------------+----------------+
+|string | Python 3.2 | This PEP |
+|size +----------------+----------------+ |
+| | 16-bit wchar_t | 32-bit wchar_t | |
+| +---------+------+--------+-------+--------+-------+
+| | 32-bit |64-bit| 32-bit |64-bit | 32-bit |64-bit |
++-------+---------+------+--------+-------+--------+-------+
+|1 | 40 | 64 | 40 | 64 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|2 | 40 | 64 | 48 | 72 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|3 | 40 | 64 | 48 | 72 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|4 | 48 | 72 | 56 | 80 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|5 | 48 | 72 | 56 | 80 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|6 | 48 | 72 | 64 | 88 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|7 | 48 | 72 | 64 | 88 | 48 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+|8 | 56 | 80 | 72 | 96 | 56 | 88 |
++-------+---------+------+--------+-------+--------+-------+
+
+
 Copyright
 =========
 
-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /