Created
November 12, 2012 04:46
-
-
Save jeamland/4057571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> python -m timeit 'str("wombles are small") + ";"' | |
1000000 loops, best of 3: 0.309 usec per loop | |
> python -m timeit '"%s;" % "wombles are small"' | |
10000000 loops, best of 3: 0.0344 usec per loop | |
> python -m timeit '"{};".format("wombles are small")' | |
1000000 loops, best of 3: 0.374 usec per loop |
schinckel
commented
Nov 12, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment