On 8/30/06, Jack Diederich <[EMAIL PROTECTED]> wrote:
I think that Bob alluded to it. They are talking about a string that uses 1 byte-per-character for ASCII text, perhaps two bytes-per-character for a mix of Greek and Russian text and four bytes-per-character for certain Chinese or Japanese strings. From the Python programmers' point of view it should be an invisible optimization.
Paul Prescod
On Wed, Aug 30, 2006 at 08:56:03PM -0700, Bob Ippolito wrote:
> > and also based on the cET (and NFS) experiences, it wouldn't surprise me
> > if a naive 32-bit text string implementation will, on average, slow things down
> > *more* than any string view implementation can speed things up again...
> >
> > (in other words, I'm convinced that we need a polymorphic string type. I'm not
> > so sure we need views, but if we have the former, we can use that mechanism to
> > support the latter)
>
> +1 for polymorphic strings.
>
> This would give us the best of both worlds: compact representations
> for ASCII and Latin-1, full 32-bit text when needed, and the
> possibility to implement further optimizations when necessary. It
> could add a bit of complexity and/or a massive speed penalty
> (depending on how naive the implementation is) around character
> operations though.
Having watched Fredrik casually double the speed of many str and unicode
operations in a week I'm easily +1 on whatever he says. Bob's support
makes that a +2, he struck me as quite sane too.
That said can you guys expand on what polymorphic[1] means here in particular?
I think that Bob alluded to it. They are talking about a string that uses 1 byte-per-character for ASCII text, perhaps two bytes-per-character for a mix of Greek and Russian text and four bytes-per-character for certain Chinese or Japanese strings. From the Python programmers' point of view it should be an invisible optimization.
Paul Prescod
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
