On Wed, Jun 27, 2012 at 14:28, Laurence Tratt wrote:
> On Wed, Jun 27, 2012 at 02:57:25PM +0200, Landry Breuil wrote:
> 
>>> To build PyPy, you will need a fair bit of RAM (8Gb is definitely safe;
>>> 6Gb is probably safe). Once built, PyPy often consumes less memory than
>>> CPython.
> [...]
>> They use java to build or what ? What can be so greedy and insane that it
>> needs that much ram ?
> 
> It is a very unusual system. It reads in hundreds of thousands of lines of
> Python (well, RPython) code, performs static analysis on it, then spits out
> C; some of those files equally cause GCC to consume a few Gb of RAM.
> 
> At the risk of a shamless plug, this article I wrote partly explains why PyPy
> and RPython are so interesting:
> 
> 
> http://tratt.net/laurie/tech_articles/articles/fast_enough_vms_in_fast_enough_time

That's a great link, I'll just summarize it a bit for the impatient. :)

pypy didn't actually build a python jit, they built a jit
compiler compiler. You feed it a fairly simple interpreter for *any*
language, and it spits out a complete jit engine for that language.

It's analogous to yacc.  You don't actually write the parser, you
write a description of the grammar, and yacc makes the parser.
Scaling that up from parser to jit is cool (if resource intensive).

Writing a pf rule evaluator in rpython would be a sweet evil genius
project. :)



Reply via email to