Skip to content

Instantly share code, notes, and snippets.

@lachlan-eagling
Created November 2, 2019 02:06
Show Gist options
  • Select an option

  • Save lachlan-eagling/1ff477d9b9775d34571e114011c2415a to your computer and use it in GitHub Desktop.

Select an option

Save lachlan-eagling/1ff477d9b9775d34571e114011c2415a to your computer and use it in GitHub Desktop.
Blog - Performance Profiling - Fibonacci Profile
import cProfile
def fib(n):
if n < 2:
return n
return fib(n - 1) + fib(n - 2)
cProfile.run("fib(35)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment