On Sun, Jun 22, 2008 at 5:39 PM, Riccardo Gori <[EMAIL PROTECTED]> wrote:
>
> On Sunday 22 June 2008 12:47:38 physnut wrote:
>> hello there, i'm only new to this project (and haven't started helping
>> at all
>> yet...) but wouldn't it be better to retain both versions and give
>> them
>> slightly different names (and explain there are two in docstrings)?  I
>> am
>> presuming that the version which modifies the matrix in situ is faster
>> and/or
>> uses lower memory for lots of large matrices?  From a CAS standpoint I
>> agree
>> with the convenience of making a new matrix, but I am probably not
>> alone in
>> wanting to use symbolic mathematics as part of the internals of my
>> program
>> and since I am running a home cluster the more efficient the code, the
>> smaller
>> my electricity bill is!!
>>
>
> Hello,
> I can suggest a solution:
> we could implement expand (and the other functions as applyfunc, diff, etc...)
> in that way:
>
> def function(self,modint=False):
>        if modint:
>                modify(self)
>        else:
>                return new_modified
>
> The version that modify the matrix is 15-20% faster, and uses lot less memory
> (I don't know how to measure it, with a big matrix and using top I can see
> 35-40% less memory used, but this is not a good method to measure)

What others think about this? What does Sage/numpy and other CAS systems do?

Ondrej

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to