Hello Tim,
Hum, I appear to have forgotten a few things about Psyco...
On Tue, Jun 22, 2004 at 11:52:35AM -0700, Tim Hochberg wrote:
> >Accelerating this is not obvious. It involves first getting used to w=
hat=20
> >this
> >strange object is (PyMemberDescr_Type in descrobject.c), and writing a=
=20
> >virtual
> >implementation for its tp_descr_get (i.e. member_get()). This virtual
> >implementation should have a way to associate meta-implementations wit=
h
> >individual members (a tp_meta_members table)...
> >=20
> >
> Brrrr! Ok, I think I'll forgo attempting to do anything about this for =
now.
Actually, there is a pdescrobject.c doing some of it already. It calls
PsycoMember_GetOne() in pstructmember.c. This means that for the 'real' =
and
'imag' members of complex objects, they are read directly from the
PyComplexObject. This is quite good, expect that I guess you're implemen=
ting
virtual complex objects, like pfloatobject.c has virtual float objects; t=
hen
this will force the PyComplexObject to be created whenever 'real' or 'ima=
g' is
read.
Well, I guess I have to think a bit more about it -- and also about the
conjugate() method:
> >Unfortunately, c.conjugate() is much easier to implement. See e.g. ho=
w
> >list.append() is implemented.
That's a lie. list.append() is not implemented in Psyco -- it doesn't re=
ally
need to be, because the built-in list_append() is about as fast as it can=
be. =20
Actually, I now think that no built-in method whatsoever is implemented b=
y
Psyco, only built-in operations. I'd have to think a bit about how to do=
that
too.
A bient=F4t,
Armin
|