STINNER Victor <victor.stin...@gmail.com> added the comment: > Parameters of the Unicode writer (overallocation factor > and initial size) may be adjusted (later?) for better performances.
I tried to compute the initial size from the args object. It is hard because we don't know how arguments are used. For example, an argument may not be a number formatted as decimal, but the width of an argument. Another example: "%.3s" may be used to only read the 3 first characters of a very long string. So I consider that it is *simpler and safer* to not guess anything from args, but only choose correctly the overallocation factor. I tried the following factors: 1 (no overallocation), 1.25, 1.5 and 2.0. It looks like 1.25 (pos*5/4) is the best compromise and offers the best performances. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14687> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com