STINNER Victor added the comment:

> More generally though, this would be improved by precompiling some of the 
> information (like Argument Clinic does, perhaps).

The same idea was already proposed to optimize str%args and str.format(args). 
struct.unpack() does also compile the format into an optimize structure (and 
have a cache).

We may do something like Martin von Loewis's _Py_IDENTIFIER API: compile at 
runtime at the first call, and cache the result in a static variable.

It's not a tiny project, and I don't know exactly how to build a "JIT compiler" 
for getargs.c, nor how complex it would be. But it would speed up *all* Python 
calls, so any Python application.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17170>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to