[Python-ideas] PEP 3155 - Qualified name for classes and functions

Antoine Pitrou solipsis at pitrou.net
Mon Oct 31 20:54:06 CET 2011


> >> Have you done benchmarks like the Unicode Changes PEP has?
> 
> > I don't expect it to have any interesting impact. What benchmarks
> > do you have any mind?
> 
> I would personally be satisfied with just timing the regression suite
> before and after, though others (Unladen Swallow?) may have more
> representative workloads.
> 
> My biggest concern is that any memory increase (let alone 6%) may
> matter if it forces the use of extra cache lines.

I've just timed running the test suite (in non-debug mode) and the
result (user CPU time) is not significantly different: 3m5s without the
patch, 3m7s with it.

pybench also shows similar results. Without patch:

Test                             minimum  average  operation  overhead
-------------------------------------------------------------------------------
          BuiltinFunctionCalls:     59ms     60ms    0.12us    0.164ms
    ComplexPythonFunctionCalls:     60ms     62ms    0.31us    0.275ms
           PythonFunctionCalls:     55ms     56ms    0.17us    0.165ms
             PythonMethodCalls:     74ms     74ms    0.33us    0.099ms
-------------------------------------------------------------------------------
Totals:                            248ms    252ms

With patch:

Test                             minimum  average  operation  overhead
-------------------------------------------------------------------------------
          BuiltinFunctionCalls:     59ms     61ms    0.12us    0.163ms
    ComplexPythonFunctionCalls:     59ms     60ms    0.30us    0.273ms
           PythonFunctionCalls:     55ms     55ms    0.17us    0.164ms
             PythonMethodCalls:     77ms     78ms    0.35us    0.099ms
-------------------------------------------------------------------------------
Totals:                            251ms    254ms


Regards

Antoine.





More information about the Python-ideas mailing list