[Python-Dev] Summary: rejection of 'dynamic attribute' syntax (original) (raw)

Thomas Heller theller at ctypes.org
Wed Feb 14 17:38:32 CET 2007


Steve Holden schrieb:

Ben North wrote: [...]

Guido van Rossum wrote:

I missed discussion of the source of the 1%. Does it slow down pystone or other benchmarks by 1%? That would be really odd, since I can't imagine that the code path changes in any way for code that doesn't use the feature. Is it that the ceval main loop slows down by having two more cases?

That seems to be it, yes. I tested this by leaving the grammar, compilation, and AST changes in, and conditionally compiling just the three extra cases in the ceval main loop. Measurements were noisy though, as Josiah Carlson has also experienced:

I've found variations of up to 3% in benchark times that seemed to be based on whether I was drinking juice or eating a scone while working. I'm afraid I can't remember what I was eating or drinking at the time I did my tests. A further data point is that modern machines seem to give timing variabilities due to CPU temperature variations even if you always eat exactly the same thing. One of the interesting facts to emerge from the Need for Speed sprint last year is that architectural complexities at many levels make it extremely difficult nowadays to build a repeatable benchmark of any kind.

My personal experience using a dual core machine (on WinXP) is that timing results become much more reproducible.

Thomas



More information about the Python-Dev mailing list