signum() not in math?
phr-n2001d at nightsong.com
Sun Oct 14 04:12:19 CEST 2001
bokr at accessone.com (Bengt Richter) writes:
> >This is partly because of the enormous speed difference between the
> >interpreter and C functions, and partly from a desire of not having to
> Has anyone considered an "inline" attribute for Python functions, to
> avoid the proportionately large calling overhead for trivial functions?
Inlining requires that the function definition be available when the
call is compiled, and also it changes the semantics since the code
lookup is no longer dynamic (that's not necessarily a bad thing
Basically though, inlining, if apropriate, should be done by the
compiler without the user needing to ask for it explicitly. The
user might have to provide some advice indicating inlining is ok.
Even with inlining, C code will be a lot faster than interpreted code.
More information about the Python-list