Profiling gives very different predictions of best algorithm

Terry Reedy tjreedy at udel.edu
Fri May 1 17:50:00 EDT 2009


Rick Muller wrote:
> I'm the main programmer for the PyQuante package, a quantum chemistry
> package in Python. I'm trying to speed up one of my rate determining
> steps. Essentially, I have to decide between two algorithms:
> 
> 1. Packed means that I compute N**4/8 integrals, and then do a bunch
> of indexing operations to unpack;
> 2. Unpacked means that I compute all N**4 integrals, but don't have to
> do any indexing.
> 
> Raw timing the two options show that packed is clearly faster (12.5
> sec vs 20.6 sec). However, the profilings show very different results.
> I have the results below. Clearly I'm going to use the packed scheme.
> My question to the mailing list is what am I doing wrong with my
> profiling that it shows such poor predictions? 

That *might* be easier to answer if you were to show exactly what you 
did to get the odd-looking results ;-)




More information about the Python-list mailing list