Skip to content

Instantly share code, notes, and snippets.

@kgriffs
Created August 29, 2013 19:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgriffs/6382507 to your computer and use it in GitHub Desktop.
Save kgriffs/6382507 to your computer and use it in GitHub Desktop.
Quick benchmark showing the difference between using datetime and time
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