On Thu, May 12, 2011 at 10:51 AM, SherjilOzair <sherjiloz...@gmail.com> wrote:
> A very smart and to-the-point question, Matthew. I've been wanting the
> answer to this question myself when working on my project. The answer
> to this question is critical for code writing.
>
> Another issue I would like to raise, that I believe is related to this
> topic, is a phrase in the Sympy Mission,
>
> "… while keeping the code as simple as possible in order to be
> comprehensible and easily extensible."
>
> How do we, as coders, follow this maxim ? Do we sacrifice performance
> for readability ? Or is this line just their to emphasize our choice
> of choosing python as our language. A notable example which doesnt
> follow this guideline is the Polys internals. Comments ?

I very strongly believe that it is possible to write clear and
extensible code that is also fast.  A special case of this is my also
strong belief that code written Python can be just as fast as code
written in C or any other language, at least for a CAS. In my
experience, the speed of your CAS functionality has less to do with
your underlying language and more to do with the speed of your
algorithms.  For example, the tests I've done indicate that
risch_integrate() is just as fast as integrate() in Maple for
complicated integrals.

How do you think that the polys internals do not follow this?  I think
that they are actually a good example of this.  The code is (for the
most part) clean, and it is designed in a modular way that makes it
extensible (for example, you can easily plug in different ground types
of different low level representations). But on the other hand, it is
very fast.  Part of this comes from the modularity of it, because it's
much easier to optimize the low level code, which is basically just
nested lists of integers.

Another example I can give you is the ODE module I wrote two summers
ago.  I decided to make the module very extensible by separating the
solving methods from the solver, so if an ODE matches various methods,
it can be solved with any of them.  This also ended up making the
solver faster, because we can make the default order of the methods
match the speed (for example, it will always try the faster
undetermined coefficients method before the slower but more general
variation of parameters method).

Aaron Meurer

>
> As to the original question, is there any data of where/how Sympy is
> used ?
> If not, can we start collecting such data ?
>
> Thanks Matthew, once again, to raise such an important question.
>
> -Sherjil Ozair
>
> On May 12, 8:14 pm, Matthew Rocklin <mrock...@gmail.com> wrote:
>> Do we have a clear understanding of who our userbase is?
>>
>> Is SymPy being used for education? for research in academia? in industry? I
>> imagine the answer is that "yes, it's being used in all of those places".
>> Does anyone know the extent to which it's used in these contexts? While
>> designing I'd like to know what audience I should target.
>>
>> Best,
>> -Matt
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to