Method much slower than function?

Grant Edwards grante at visi.com
Thu Jun 14 00:18:16 EDT 2007


On 2007-06-14, idoerg at gmail.com <idoerg at gmail.com> wrote:

> The method takes > 10 seconds, the function call 0.041 seconds!

What happens when you run them in the other order?

The first time you read the file, it has to read it from disk.
The second time, it's probably just reading from the buffer
cache in RAM.

-- 
Grant Edwards                   grante             Yow!  Catsup and Mustard
                                  at               all over the place! It's
                               visi.com            the Human Hamburger!



More information about the Python-list mailing list