On 13.02.13 15:27, Amaury Forgeot d'Arc
2013/2/13 Lennart Regebro <email@example.com>
This has the benefit of being slow both on CPython and PyPy.
On Wed, Feb 13, 2013 at 1:10 PM, Serhiy
> I prefer "x = '%s%s%s%s' % (a, b, c, d)" when string's
number is more than 3
> and some of them are literal strings.
using .format() is even slower. :-)
Did you really try it?
PyPy is really fast with str.__mod__, when the format string
is a constant.
Yes, it's jitted.
How about the .format() style: Is that jitted as well?
In order to get people to prefer .format over __mod__,
it would be nice if PyPy made this actually _faster_ :-)
Christian Tismer :^) <mailto:firstname.lastname@example.org>
Software Consulting : Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/
14482 Potsdam : PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776 fax +49 (30) 700143-0023
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/