Re: [pypy-dev] Re: [ann] Minimal Python project
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 interpreter. 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@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? Paul
Paul Rubin wrote:
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 interpreter.
Sure. But please see Guido's reply on the list. I think I've read a similar message long ago, so I won't touch this now.
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.
I think to try this from the beginning. ... [more tags bits... I know :-)]
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@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).
Please subscribe at http://codespeak.net/mailman/listinfo/pypy-dev
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.
Sure he's welcome. Being on the list does btw. not imply to have to join the sprint :-)
How much traffic is on the list?
Well, 128 messages by now. cheers - chris -- Christian Tismer :^) <mailto:tismer@tismer.com> Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
Hello Paul, On Thu, Jan 16, 2003 at 06:41:14PM -0000, Paul Rubin wrote:
I'd think the object representation is pretty fundamental, so once you choose something, it will take a lot of rework to change it.
Only if you code directly in C. By keeping at the high level all the time and using tools to emit the low-level stuff, you can experiment with zillons of variants. Surely, among the things I'd like to try are various forms of boxing, the double-pointers representation (Christian, in GCC you can return a struct from a function and if its size is only two pointers then the function will just return them in two registers), all with or without reference counting. We might also try emitting code for another statically typed language which already has a good GC and some boxing, like OCaml. We could even target Java too, reusing the nice work on Jython but emitting our own interpreter core -- which could make it much easier to keep Jython in sync with CPython. I'm not trying to impress people, all these are things that can clearly be done with reasonably little work. A bientot, Armin.
participants (3)
-
Christian Tismer -
Paul Rubin -
RIGO Armin