How about the .format() style: Is that jitted as well?On 13.02.13 15:27, Amaury Forgeot d'Arc wrote:
2013/2/13 Lennart Regebro <email@example.com>
On Wed, Feb 13, 2013 at 1:10 PM, Serhiy Storchaka <firstname.lastname@example.org> wrote:This has the benefit of being slow both on CPython and PyPy. Although
> 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.
In order to get people to prefer .format over __mod__,
it would be nice if PyPy made this actually _faster_ :-)