Created
August 29, 2013 19:41
-
-
Save kgriffs/6382507 to your computer and use it in GitHub Desktop.
Quick benchmark showing the difference between using datetime and time
This file contains hidden or 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
In [56]: %timeit datetime.datetime.utcnow() | |
1000000 loops, best of 3: 875 ns per loop | |
In [57]: %timeit time.time() | |
10000000 loops, best of 3: 110 ns per loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment