Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    +1, but just to this, if your program connects to a network (or the internet) for any reason, that could cause this as well. Commented Oct 4, 2013 at 13:17
  • 6
    Also it may be that the program was loaded into to memory, or need some form of compilation on the first run.. so that made it slower. It not uncommon for the the first run of code to be slower than all subsequent runs. Commented Oct 4, 2013 at 13:18
  • Since it's a python program, there was definitely some form of compilation on the first run, and the second run probably used the cached .pyc file(s) to avoid it. Commented Nov 14, 2013 at 15:11