[Python-Dev] RFC: Add a new builtin strarray type to Python? (original) (raw)
Maciej Fijalkowski fijall at gmail.com
Sun Oct 2 02:33:33 CEST 2011
- Previous message: [Python-Dev] RFC: Add a new builtin strarray type to Python?
- Next message: [Python-Dev] RFC: Add a new builtin strarray type to Python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Oct 1, 2011 at 5:21 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
On Sat, 1 Oct 2011 22:06:11 +0200 Victor Stinner <victor.stinner at haypocalc.com> wrote:
> I'm writing this email to ask you if this type solves a real issue, or if > we can just prove the super-fast str.join(list of str). Hum, it looks like "What is the most efficient string concatenation method in python?" in a frequently asked question. There is a recent thread on python- ideas mailing list:
Victor, you can't say it's x times slower. It has different complexity, so it can be arbitrarily slower.
So, since people are confused at the number of possible options, you propose to add a new option and therefore increase the confusion? I don't understand why StringIO couldn't simply be optimized a little more, if it needs to. Or, if straightforward string concatenation really needs to be fast, then str + str should be optimized (like it used to be).
As far as I remember str + str is discouraged as a way of concatenating strings. We in pypy should make it fast if it's really the official way.
StringIO is bytes only I think, which might be a bit of an issue if you want a unicode at the end.
PyPy's Unicode/String builder are a bit hacks until we come up with something that can make ''.join faster I think.
Cheers, fijal
Regards Antoine.
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fijall%40gmail.com
- Previous message: [Python-Dev] RFC: Add a new builtin strarray type to Python?
- Next message: [Python-Dev] RFC: Add a new builtin strarray type to Python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]