[Cython] Speed up cython for enum declarations
David Cournapeau
cournape at gmail.com
Wed Dec 3 10:13:58 CET 2008
On Wed, Dec 3, 2008 at 5:58 PM, Robert Bradshaw
<robertwb at math.washington.edu> wrote:
> On Dec 3, 2008, at 12:34 AM, David Cournapeau wrote:
>
>> On Wed, Dec 3, 2008 at 4:06 PM, Robert Bradshaw
>> <robertwb at math.washington.edu> wrote:
>>
>>> No, this is a big issue for me with Sage as well (not just
>>> enumerations, but long lists of declarations in general). I've got
>>> some code that speeds things up by a factor of two or so, but haven't
>>> checked it in yet (it was mixed in with a bunch of failed speedups,
>>> and I didn't have time to clean it up at the time).
>>
>> Ok, that would already be helpful. May I ask why long list of
>> declarations are slow in general ? Parsing them should fast, no ?
>
> Actually, the parsing takes up a significant amount of the compile time.
Is it because the parser cannot assume there is only declarations, or
is parsing declarations is inherently slow ?
> Yes and no. This is something I've tried to do before, and still want
> to do. One difficulty is handling dependancies between pxd files, for
> example if a typedef or cdef class changes in one, then everything
> that cimports and uses it changes.
I don't understand: how is this a cython problem ? This should be
handled by your build tool, no ?
cheers,
David
More information about the Cython-dev
mailing list