Author belopolsky
Recipients belopolsky, josiahcarlson, larry, lskovlund, rhettinger
Date 2008-03-24.19:33:38
SpamBayes Score 0.234495
Marked as misclassified No
Message-id <1206387220.22.0.821285592311.issue1569291@psf.upfronthosting.co.za>
In-reply-to
Content
Attached patch (issue1569291.diff) reimplements the optimization by
following Objects/stringobject.c logic as Raymond suggested.

I see two remaining issues which in my view should be addressed separately:

1. There is no check for overflow after the multiplication computing the
size of the resulting array.  Note that while newarrayobject checks that
size*itemsize does not overflow internally, there is no such check for
Py_SIZE(a) * n. A decision needs to be made whether Overflow or NoMemory
error should be raised because currently string_repeat and
newarrayobject treat overflow differently.

2. See msg64429 above.  I think both string and (patched) array codes
can be simplified.
History
Date User Action Args
2008-03-24 19:33:40belopolskysetspambayes_score: 0.234495 -> 0.234495
recipients: + belopolsky, rhettinger, josiahcarlson, larry, lskovlund
2008-03-24 19:33:40belopolskysetspambayes_score: 0.234495 -> 0.234495
messageid: <1206387220.22.0.821285592311.issue1569291@psf.upfronthosting.co.za>
2008-03-24 19:33:39belopolskylinkissue1569291 messages
2008-03-24 19:33:38belopolskycreate