Re: possible bug in Pyrex

Greg Ewing <[email protected]> Fri, 26 Feb 2010 12:29:16 +1300
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Stefan Behnel wrote:

> As a general rule of thumb, the code generated by Cython is quite a bit
> longer and substantially faster than the corresponding Pyrex code.

Be careful you're not comparing apples with oranges here,
though. Pyrex is capable of generating quite efficient code
for many things, it's just not as automatic as Cython.

For example, I gather that Cython will generate a test
for a list object and index it using list-specific calls
in that case.

Recent versions of Pyrex will also use list-specific calls,
but only if you declare it as a list. Theoretically this
should be even faster, because there is no run-time test
involved.

-- =

Greg