[pypy-dev] Re: [ann] Minimal Python project
phr-2002 at nightsong.com
Thu Jan 16 19:41:14 CET 2003
It can avoid lots of allocations, but also turns every object access
into some macro processing. for a language that I have to code by
hand, I don't like that so much.
It's not really that bad. Most of the time, the macro doesn't do
anything. In fact, wouldn't the pypy compiler take care of it
automatically? The macro is only an issue in the low level C
For the bootstrap phase, I'd say hands off from any changes of the
model. First we redefine the world identically "in place". When
that works, we can try changing worlds.
I'd think the object representation is pretty fundamental, so once you
choose something, it will take a lot of rework to change it. Hopefully
you can prepare for that by writing flexibly.
> all other objects would be boxed, and the address left shifted by 1
> and ORed with 1.
Humm. I would use the left shifted integer, or'ed with 1. After
testing that bit, Arithmetic right shift gives the integer. That
allows to use the address variant without any operation and has the
nice debugging facility that addresses are already addresses, and
object inspection works directly.
Yes. Also, you can add the shifted integers together without having
to unshift or mask them.
You can also use 2 or 3 tag bits, and encode other types in a single
word. For example, Python probably uses an awful lot of 1-character
strings, so boxing those could do some good.
Olin Shivers article about T is pretty inspirational--you might look
at it: <http://www.paulgraham.com/thist.html>.
p.s.: Paul, would you mind to participate in pypy-dev,
then we can avoid crossposting.
I guess I can live with this, though I'd rather use the newsgroup.
Is crossposting so hard? If you want to put me on a mailing list,
please use the address phr-pypy at nightsong.com so I can auto-route it.
(Btw I don't like the name pypy much. There are several others
in that thread which I like a lot better).
There's another guy I'd also like to invite, a Lisp expert, if that's
ok with you. He's been interested in writing a Python compiler for a
while. I'll ask him if he wants to join, but he might not.
How much traffic is on the list?
More information about the Pypy-dev