[pypy-dev] planning the 0.6.2 PyPy release
Ben.Young at risk.sungard.com
Ben.Young at risk.sungard.com
Mon Jun 13 11:06:15 CEST 2005
Hi Armin
Just a quick followup question....
>> In a week or so I may have a little time to do a bit of coding. Is
there
>> anything specific I should look at? For instance I noticed that at the
>> moment the list rep resizes exactly. The python version (and stuff like
>> std::vector in c++) have a overallocation stratagy thay minimises
>> allocation calls. Would this be an idea I could try to implement in
>> rpython?
>An excellent question! It's slightly strange, given that
>pypy.objspace.std.listobject already does over-allocation, that we might
>need it again at this lower level. It's possible that it would make
>sense for some of the lists that we have around, and not for others --
>the hard question will eventually be to decide when to use it or not.
>But yes, I guess that before deciding that, we'd need to have both
>options written :-) (There are still some open questions there; for
>example, it's not too difficult to detect list comprehensions by looking
>at the flow graphs; then instead of heuristic over-allocation for the
>list that is being built, it's often possible to determine in advance
>the size of the list -- e.g. because it will be the same length as
>another list that we iterate over.)
Does this mean that when you eventually come to *dynamically* annotate
code that lists will be an annotated version of the std.listobject, or do
you expect it to use the rpython typer as well?
Thanks for answering all these questions, it definitely is making things
clearer in my mind.
Cheers,
Ben
More information about the Pypy-dev
mailing list