PEP-xxx: Unification of for statement and list-comp syntax
Heiko Wundram
me+python at modelnine.org
Wed May 24 02:54:38 EDT 2006
Am Mittwoch 24 Mai 2006 06:12 schrieb Tim Roberts:
> At one time, it was said that the "%" operator was the fastest way to
> concatenate strings, because it was implemented in C, whereas the +
> operator was interpreted. However, as I recall, the difference was hardly
> measurable, and may not even exist any longer.
The difference doesn't exist anymore for CPython (if you join a lot of
strings), but for Jython (and several other dialects), the fastest way to
join strings is still "".join(), because there are no optimizations on
a += b
and the likes of it (replacement for the % operator, e.g.).
--- Heiko.
More information about the Python-list
mailing list