<br><div class="gmail_quote">2013/2/13 Christian Tismer <span dir="ltr"><<a href="mailto:tismer@stackless.com" target="_blank">tismer@stackless.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="adM"><div class="im"><div>On 13.02.13 15:27, Amaury Forgeot d'Arc
      wrote:<br>
    </div>
    <blockquote type="cite"><br>
      <div class="gmail_quote">2013/2/13 Lennart Regebro <span dir="ltr"><<a href="mailto:regebro@gmail.com" target="_blank">regebro@gmail.com</a>></span><br>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>On Wed, Feb 13, 2013 at 1:10 PM, Serhiy
            Storchaka <<a href="mailto:storchaka@gmail.com" target="_blank">storchaka@gmail.com</a>>
            wrote:<br>
            > I prefer "x = '%s%s%s%s' % (a, b, c, d)" when string's
            number is more than 3<br>
            > and some of them are literal strings.<br>
            <br>
          </div>
          This has the benefit of being slow both on CPython and PyPy.
          Although<br>
          using .format() is even slower. :-)</blockquote>
      </div>
      <br>
      Did you really try it?
      <div>PyPy is really fast with str.__mod__, when the format string
        is a constant.</div>
      <div>Yes, it's jitted.</div>
    </blockquote>
    <br></div></div>
    How about the .format() style: Is that jitted as well?<br>
    In order to get people to prefer .format over __mod__,<br>
    it would be nice if PyPy made this actually _faster_ :-)</blockquote></div><br>.format() is jitted as well.<div>But it's still slower than str.__mod__ (about 25%)</div><div>I suppose it can be further optimized.</div>
<div><div><div><br></div>-- <br>Amaury Forgeot d'Arc
</div></div>