Message159831
| Author |
vstinner |
| Recipients |
loewis, pitrou, python-dev, serhiy.storchaka, vstinner |
| Date |
2012年05月03日.01:41:24 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1336009285.43.0.101825688909.issue14687@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年05月03日 01:41:25 | vstinner | set | recipients:
+ vstinner, loewis, pitrou, python-dev, serhiy.storchaka |
| 2012年05月03日 01:41:25 | vstinner | set | messageid: <1336009285.43.0.101825688909.issue14687@psf.upfronthosting.co.za> |
| 2012年05月03日 01:41:24 | vstinner | link | issue14687 messages |
| 2012年05月03日 01:41:24 | vstinner | create |
|