Python IS slow ! [was] Re: Python too slow for real world
Michael Hudson
mwh21 at cam.ac.uk
Sun May 2 08:03:32 EDT 1999
One of these days I'll remember that `R' is `reply' in gnus, and I
usually want to hit `F'....
Christian Tismer <tismer at appliedbiometrics.com> writes:
> Michael Hudson wrote:
> >
> > Christian Tismer <tismer at appliedbiometrics.com> writes:
[snip]
> > A word of warning: this code is nasty, *nasty*, NASTY. Possibly the
> > most horrible thing you will see perpetrated in Python this year. It
> > applies regular expressions to strings of bytecode...
>
> I'm really impressed. No, what is ugly about that?
Well, it's highly dependent on the internals of the interpreter, for
starters.
> Don Beaudry's functor module comes into mind.
> Not fiddling bytecodes, but the techniques are nearly
> as "insane" as yours. Do you think that functors
> could be sped up with your bytecode art?
It seems so. I've found something to do with my starship page beyond
basic fiddling at last; go to http://starship.python.net/crew/mwh to
find a little tarball containing closure.py from my last post and
xapply.py. xapply.py implements functor.xapply for the simplest cases;
it ignores varadic details and keyword arguments entirely. It does
work for methods (bound and unbound).
I haven't timed it, but so far as I understand, it should implement
partial argument resolution with slowdown by a factor of 1 :-).
xapply.py contains improvements to my bytecode fiddling suggested by
Tim Peters (which were sent to the list as well but don't seem to have
shown up on the newsgroup yet). I haven't merged these into
closure.py, but it won't take long... I've just done it in fact.
I *so* should be revising...
Michael
More information about the Python-list
mailing list