[pypy-issue] [issue1328] cProfile: slow on built-in function calls

Armin Rigo tracker at bugs.pypy.org
Sun Nov 18 23:17:46 CET 2012


New submission from Armin Rigo <armin.rigo at gmail.com>:

The cProfile recording overhead with the JIT is low when counting function
calls, but very high when counting calls to built-in functions.  Jitviewer shows
that it takes a lot of residual calls around a single call to a built-in
function.  It seems to me that we did not put enough efforts in optimizing this.
 A trivial example shows an overhead of about 500x:

def f(n):
    lst = []
    for i in xrange(n):
        lst.append(i)     # built-in call
        lst.pop()         # built-in call

----------
messages: 5010
nosy: arigo, pypy-issue
priority: performance bug
status: unread
title: cProfile: slow on built-in function calls

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1328>
________________________________________


More information about the pypy-issue mailing list