[Pyrex] Newbie Missing a Fundamental Point?

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 22 09:02:21 UTC 2006


Kent Borg wrote:

> Another question: How does Pyrex execute the Python I might put in a
> .pyx file?  Does it translate to C?

Yes and no. It translates it into the same sequence of
Python/C API calls that the interpreter would make if it
interpreted the same code. Take a look at the code Pyrex
generates and you'll see how it's done.

While this is usually a bit faster than interpretation,
the difference isn't great (only about 2 or 3 times at
best). So don't rely on it to make pure Python code fast.

--
Greg



More information about the Pyrex mailing list