On 11/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I added the following function to my polynomial_element.py file. The good > news is that tests on a small polynomial (order 7) ran 1k to 2k times faster > than __call__(). This thoroughly blows matlab out of the water for an > inlined function, and is about 10x faster than a hard-coded polynomial. > > Sadly, whether or not those results scale became hard to test because pyrex > seems to barf on larger polynomials using this. (my guess is that it doesn't > like the 100+ nested parentheses) > > So I guess my question is, should we expect pyrex to take an arbitrary number > of nested parentheses, or is this a job for Josh's inline c idea? (because > clearly, abandoning 3 orders of magnitude speedup isn't an option)
Just as a data point (though you're probably aware of it already) you may want to look at scipy's weave.inline, which already handles inlining of C/C++ code in python, including native support for arrays (numpy ones) regards, f --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---