[Python-Dev] Re: native code compiler? (or, OCaml vs. Python)

Jeremy Hylton jeremy@zope.com
Mon, 3 Feb 2003 18:09:29 -0500


>>>>> "TP" == Tim Peters <tim.one@comcast.net> writes:

  TP> [Neil Schemenauer]
  >> Any opinion on where to spend effort?

  TP> For real life boosts, function/method calls.  Making "len" a
  TP> builtin wouldn't help so much for saving a couple dict lookups
  TP> as it would for avoiding the call machinery, and for callees
  TP> coded in Python that's heavy work.

Do you have any ideas?

IIRC the largest expense in function calls is setting up the frame
object for the new function to use.  I don't think there are any
low-hanging fruit here, because the frame model is pretty deeply
embedded in the interpreter.  It seems like all the work in
PyEval_EvalCodeEx() has to get done sometime.

Jeremy