Message258265
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 |
|
Date |
User |
Action |
Args |
2016-01-15 03:43:00 | poostenr | set | recipients:
+ poostenr, eric.smith, steven.daprano, ubehera |
2016-01-15 03:43:00 | poostenr | set | messageid: <1452829380.94.0.825794012763.issue26118@psf.upfronthosting.co.za> |
2016-01-15 03:43:00 | poostenr | link | issue26118 messages |
2016-01-15 03:43:00 | poostenr | create | |
|