[pypy-dev] Newbie question: using PyPy to compile the source

Haoyi Li haoyi.sg at gmail.com
Sun May 5 01:41:33 CEST 2013


 of a single function?
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c3715035453704dbec5495

--001a11c3715035453704dbec5495
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Doesn't PyPy have a "compile to binary" option? I thought it did, but I
may be mistaken.

Sent from my Windows Phone
From: Phyo Arkar
Sent: 5/4/2013 6:52 PM
To: haoyi.sg at gmail.com
Cc: pypy-dev at python.org
Subject: Re: [pypy-dev] Newbie question: using PyPy to compile the
source of a single function?
Pypy is JIT. if you want to do such thing you better look for Nuitika and
Cython.


On Sun, May 5, 2013 at 5:02 AM, <haoyi.sg at gmail.com> wrote:

> I=E2=80=99m looking for some way of programmatically using PyPy to compil=
e a
> snippet of python source code (probably a function def) into an optimized
> binary, which I can call to pass data back and forth. The end goal is to
> have something like this
>
> @PyPy
> def expensive_function(arg):
>     ... expensive computation ...
>     return result
>
> using macros (https://github.com/lihaoyi/macropy) to perform this
> conversion at import time.
>
> I have no idea if this is possible or not; could anyone here give me any
> pointers or advice how to do this/why it is impossible?
>
> Thanks!
> -Haoyi
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>
>

--001a11c3715035453704dbec5495
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head><meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Cont=
ent-Type"></head><body><div><div style=3D"font-family: Calibri,sans-serif; =
font-size: 11pt;">Doesn't PyPy have a "compile to binary" option? I thought=
 it did, but I may be mistaken.<br><br>Sent from my Windows Phone<br></div>=
</div><hr><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; f=
ont-weight: bold;">From: </span><span style=3D"font-family: Tahoma,sans-ser=
if; font-size: 10pt;">Phyo Arkar</span><br><span style=3D"font-family: Taho=
ma,sans-serif; font-size: 10pt; font-weight: bold;">Sent: </span><span styl=
e=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">5/4/2013 6:52 PM</sp=
an><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font=
-weight: bold;">To: </span><span style=3D"font-family: Tahoma,sans-serif; f=
ont-size: 10pt;">haoyi.sg at gmail.com</span><br><span style=3D"font-family: T=
ahoma,sans-serif; font-size: 10pt; font-weight: bold;">Cc: </span><span sty=
le=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">pypy-dev at python.org=
</span><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; =
font-weight: bold;">Subject: </span><span style=3D"font-family: Tahoma,sans=
-serif; font-size: 10pt;">Re: [pypy-dev] Newbie question: using PyPy to com=
pile the source of a single function?</span><br><br></body></html><div dir=
=3D"ltr">Pypy is JIT. if you want to do such thing you better look for Nuit=
ika and Cython.</div><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Sun, May 5, 2013 at 5:02 AM,  <span dir=3D"ltr"><<a href=3D"m=
ailto:haoyi.sg at gmail.com" target=3D"_blank">haoyi.sg at gmail.com</a>></spa=
n> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div><div style=3D"font-family:Calibri,'=
Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei U=
I','Malgun Gothic','Khmer UI','Nirmala UI',Tung=
a,'Lao UI',Ebrima,sans-serif;font-size:16px">

<div>I=E2=80=99m looking for some way of programmatically using PyPy to com=
pile a snippet of python source code (probably a function def) into an opti=
mized binary, which I can call to pass data back and forth. The end goal is=
 to have something like this</div>

<div>=C2=A0</div><div>@PyPy</div><div>def expensive_function(arg):</div><di=
v>=C2=A0=C2=A0=C2=A0=C2=A0... expensive computation ...</div><div>=C2=A0=C2=
=A0=C2=A0 return result</div><div>=C2=A0</div><div>using macros (<a href=3D=
"https://github.com/lihaoyi/macropy" target=3D"_blank">https://github.com/l=
ihaoyi/macropy</a>) to perform this conversion at import time.</div>

<div>=C2=A0</div><div>I have no idea if this is possible or not; could anyo=
ne here give me any pointers or advice how to do this/why it is impossible?=
</div><div>=C2=A0</div><div>Thanks!</div><div>-Haoyi</div></div></div><br>_=
______________________________________________<br>


pypy-dev mailing list<br>
<a href=3D"mailto:pypy-dev at python.org">pypy-dev at python.org</a><br>
<a href=3D"http://mail.python.org/mailman/listinfo/pypy-dev" target=3D"_bla=
nk">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>
<br></blockquote></div><br></div>

--001a11c3715035453704dbec5495--


More information about the pypy-dev mailing list