pypy / pypy / doc / config / translation.backendopt.mallocs.txt

This optimization enables "malloc removal", which "explodes"
allocations of structures which do not escape from the function they
are allocated in into one or more additional local variables.

An example.  Consider this rather unlikely seeming code::

    class C:
        pass
    def f(y):
        c = C()
        c.x = y
        return c.x

Malloc removal will spot that the ``C`` object can never leave ``f``
and replace the above with code like this::

    def f(y):
        _c__x = y
        return _c__x

It is rare for code to be directly written in a way that allows this
optimization to be useful, but inlining often results in opportunities
for its use (and indeed, this is one of the main reasons PyPy does its
own inlining rather than relying on the C compilers).

For much more information about this and other optimizations you can
read section 4.1 of the technical report on "Massive Parallelism and
Translation Aspects" which you can find on the `Technical reports page
<../index-report.html>`__.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.