Antoine Pitrou added the comment:

Here is a patch applicable for SVN trunk.
However, as Bob I have mixed results on this. For example, functions
with variable parameter count have become slower:

# With patch
$ ./python -m timeit -s "def f(*x): pass" 'for x in xrange(10000): f(1)'
100 loops, best of 3: 4.92 msec per loop
$ ./python -m timeit -s "def f(*x): pass" 'for x in xrange(10000): f()'
100 loops, best of 3: 4.07 msec per loop
$ ./python -m timeit -s "def f(*x): pass" 'for x in xrange(10000): f(1,2)'
100 loops, best of 3: 5.04 msec per loop

# Without patch
$ ./python-orig -m timeit -s "def f(*x): pass" 'for x in xrange(10000):
f(1)'
100 loops, best of 3: 4.22 msec per loop
$ ./python-orig -m timeit -s "def f(*x): pass" 'for x in xrange(10000): f()'
100 loops, best of 3: 3.5 msec per loop
$ ./python-orig -m timeit -s "def f(*x): pass" 'for x in xrange(10000):
f(1,2)'
100 loops, best of 3: 4.46 msec per loop

----------
nosy: +pitrou
Added file: http://bugs.python.org/file9154/funcall.patch

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1479611>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to