classification
Title: reorganize, extend function call optimizations
Type: performance Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: mwh Nosy List: Jeremy.Hylton, ajaksu2, akuchling, georg.brandl, jhylton, mwh, richard
Priority: normal Keywords: patch

Created on 2004-01-13 16:35 by mwh, last changed 2010-02-22 22:11 by Jeremy.Hylton. This issue is now closed.

Files
File name Uploaded Description Edit
function-optimization-reorg.diff mwh, 2004-01-13 16:35 mwh's patch #1
Messages (9)
msg45281 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-01-13 16:35
This patch rejigs the optimizations for certain kinds
of function call -- easy Python functions, METH_O
functions and so on.

It also extends the "easy Python function" optimization
to handle default arguments.

It adds a tp_pythoncall field to type objects, with the
signature of the ceval.c local static function do_call
(which is now exported and called PyEval_DoCall).  This
field is filled out in the function and method
constructors appropriately.

What do you think?  Makes little performance difference
(0.5% improvement in pystone on one machine), but I
think I prefer this arrangement.  It generalizes
better, for one thing.

The patch is a little untidy at present -- some code
duplication and it utterly mangles the function call
statistics code -- but these should be shallow.
msg45282 - (view) Author: Jeremy Hylton (jhylton) Date: 2004-11-07 14:29
Logged In: YES 
user_id=31392

Is this patch still relevant?  Should it wait until 2.5?
msg45283 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-11-08 12:19
Logged In: YES 
user_id=6656

Well, nothing has invalidated it.  I think I still would like to see it 
go in, but don't have strong opinions either way.  What do you 
think of it? :-)

It should certainly wait for 2.5.
msg45284 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 11:26
Logged In: YES 
user_id=1188172

2.5 is nearing, so what to do?
msg45285 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2006-05-23 14:57
Logged In: YES 
user_id=6405

This patch is far too out of date to apply to 2.5
msg82014 - (view) Author: Daniel Diniz (ajaksu2) Date: 2009-02-14 11:35
Can the patch be updated?
msg99834 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2010-02-22 21:15
Is this patch still of interest?
msg99851 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2010-02-22 22:07
I guess not.
msg99853 - (view) Author: Jeremy Hylton (Jeremy.Hylton) (Python committer) Date: 2010-02-22 22:11
Might be worth looking at for 2.x anyway.
History
Date User Action Args
2010-02-22 22:11:04Jeremy.Hyltonsetnosy: + Jeremy.Hylton
messages: + msg99853
2010-02-22 22:07:26mwhsetstatus: open -> closed
resolution: out of date
messages: + msg99851
2010-02-22 21:15:13akuchlingsetnosy: + akuchling
messages: + msg99834
2009-02-14 11:35:25ajaksu2setnosy: + ajaksu2
type: performance
messages: + msg82014
2004-01-13 16:35:24mwhcreate