Skip to content

Instantly share code, notes, and snippets.

@gtklocker
Created April 25, 2015 07:19
Show Gist options
  • Select an option

  • Save gtklocker/9985a0ca1c9e90fa74c7 to your computer and use it in GitHub Desktop.

Select an option

Save gtklocker/9985a0ca1c9e90fa74c7 to your computer and use it in GitHub Desktop.
Timing wtf
var before = +new Date();
console.log("execution took", +new Date() - before, "ms");
// execution took 13 ms
import time
before = time.time() * 1000
print "execution took %f ms" % (time.time() * 1000 - before)
# execution took 0.003906 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment