Re: Short discussion about pypy overview

Matti Picus <[email protected]>
Newsgroups gmane.comp.python.pypy
Message-ID <[email protected]>
Anyone who wants is welcome to join a short ZOOM conversation at 18:00 UTC Oct 1. Trevor and I will be going over the questions below. Here is a zoom link. If for some reason it doesn't work, check this mailing list for an update.

Matti

https://zoom.us/j/7722186582?pwd=V1JFZ3BVZ0VIblFmMVNVZ0d2enhnUT09

Meeting ID: 772 218 6582

Passcode: 123123

On 9/30/20 6:52 PM, Clack, Trevor
wrote:

Hi Matti, thank you for your response.

It will be proprietary in the sense that it will belong within
the company as part of a training presentation, but we will not
be making money from it. These training presentations go into a
growing archive of high performance computing, ranging from
instructions on how to parallelize code on GPUs to specific
tools that will help code run faster (ex. cython, numba and
hopefully pypy).

The training will not have anything enlightening on it. It's
intended as a general introduction to the tool and when to use
it (as you know it's slow when calling C extension modules and
performing very short, simple tasks compared to python) Just
that sort of stuff.

Here is what I'm specifically looking for:

A high level overview of how pypy works starting from source
code up through the end of execution. I'd like something
analogous to this description and diagram of cpython:

The cpython interpreter (written in C) parses the syntax and
creates bytecode. This bytecode is then executed by the python
virtual machine (also written in C).

So I'm not going into details like garbage collection, the GIL,
or even details of the comiler. Similarly I'd like something
that doesn't go too deeply into the innerworkings of pypy, but
gives a good idea of how the code is handled at each stage
during the execution. I've found several diagrams and charts but
they don't seem to include the whole picture or are too detailed
and I can't seem to make sense of it.

Here are some diagrams or flowcharts I've found:

For pypy, I'm uncertain for example if source code is converted
into analogous rpython then that's converted to C, or if it's
converted to bytecode then C. I'm not certain where the jit
kicks in, I know it's provided by rpython and it kicks in on hot
(>1031 loops). If a guard fails, I'm uncertain where the code
returns to being interpreted. I feel it would be quicker if we
could chat on zoom or other platform to share screens, it may be
the fastest.

I feel a good high level overview would be a good blog post for
pypy or be included in the introductory documentation.

Trevor Clack

HPCMP PET Computational Scientist

Mobile
949.412.9902

[email protected]

3909 Halls Ferry Road

Vicksburg, MS 39180

www.gdit.com

----------

From: Matti
Picus <[email protected]>

Sent: Wednesday, September 30, 2020 12:42 AM

To: Clack, Trevor <[email protected]> ;
[email protected] <[email protected]>

Subject: Re: [pypy-dev] Short discussion about pypy
overview

[External: Use caution with links & attachments]

On 9/30/20 2:15 AM, Clack, Trevor wrote:

> Hello, I'm working on giving a presentation to a high
performance

> computing community on pypy. I've got a good deal of
content developed

> except for a high level overview of how pypy in fact
works. Several

> days of YouTube, searching stack overflow, and
searching the docs

> haven't clarified much. I was hoping to get in
contact with a

> developer if it's not too much trouble

>

> Trevor Clack

>

> HPCMP PET Computational Scientist

>

> Mobile 949.412.9902

>

> [email protected] < mailto:[email protected] >

>

> 3909 Halls Ferry Road

>

> Vicksburg, MS 39180

>

> www.gdit.com
< http://www.gdit.com/ >

>

> cid:[email protected]

>

>

Hi and welcome. Could you be a little more specific: do
you mean "how

the RPython tool chain can compile a Python interpreter",
"how is PyPy

fast?", "what optimizations can the JIT do", "how does a
tracing JIT

work, "why doesn't PyPy use refcount semantics", or
something else?

Matti

_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev
cpython_flowchart.png (image/png, 23.5 KB) - not displayed
pypy_chart4.png (image/png, 84.5 KB) - not displayed
pypy_chart3.png (image/png, 77.6 KB) - not displayed
pypy_chart2.png (image/png, 22 KB) - not displayed
pypy_chart1.png (image/png, 53.5 KB) - not displayed
Outlook-cid_image0.png (image/png, 7.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.