Making programs run faster

There are various ways to make your Python programs run faster, such as the following:

  • Profile your code so you can identify the bottlenecks
  • Use built-in functions and libraries so the interpreter doesn't need to execute loops
  • Avoid using globals as Python is very slow in accessing global variables
  • Use existing packages
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset