This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author poostenr
Recipients eric.smith, poostenr, steven.daprano, ubehera
Date 2016-01-15.03:43:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452829380.94.0.825794012763.issue26118@psf.upfronthosting.co.za>
In-reply-to
Content
Eric,

I just tried your examples. 
The loop count is 100x more, but the results are about a factor 10 off.

Test1:
My results:
C:\Data>python -m timeit -s 'x=4' '",{0}".format(x)'
100000000 loops, best of 3: 0.0116 usec per loop 

Eric's results:
$ python -m timeit -s 'x=4' '",{0}".format(x)'
1000000 loops, best of 3: 0.182 usec per loop

Test2:
My results:
C:\Data>python -m timeit -s 'x=4' '"\'{0}\',".format(x)'
100000000 loops, best of 3: 0.0122 usec per loop 

Eric's results:
$ python -m timeit -s 'x=4' '"'\''{0}'\'',".format(x)'
1000000 loops, best of 3: 0.205 usec per loop
History
Date User Action Args
2016-01-15 03:43:00poostenrsetrecipients: + poostenr, eric.smith, steven.daprano, ubehera
2016-01-15 03:43:00poostenrsetmessageid: <1452829380.94.0.825794012763.issue26118@psf.upfronthosting.co.za>
2016-01-15 03:43:00poostenrlinkissue26118 messages
2016-01-15 03:43:00poostenrcreate