Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
In many ways, Smath is hard to manage. Few days ago, "augment, stack" were reported to be slow. Yes they are and are not. Observe "augment" 2 cols [2380 rows] ~ 6 minutes compared to within program Orient(M) 0.016 sec [1/14500]. Most interesting ! Jean Rotate Breather [Quaternion].sm (279kb) downloaded 30 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/10/2016(UTC) Posts: 84
Was thanked: 21 time(s) in 17 post(s)
|
Is it really stack/augment, which is "slow"? There are some functions, which are not evaluated at once, like "norme". Symbolic evaluation of M*zoom*gamma takes 11s. Maybe that's the real reason why it takes minutes.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Originally Posted by: MarB Is it really stack/augment, which is "slow"?
There are some functions, which are not evaluated at once, like "norme". Symbolic evaluation of M*zoom*gamma takes 11s. Maybe that's the real reason why it takes minutes. Correct. You can see the difference in performances using the function Orient(M), where the product M*zoom*gamma is done at once and the numerical evaluation forced for all the matrix elements before any manipulation of his shape (col/augment). Edited by user 03 July 2017 11:30:22(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: MarB Is it really stack/augment, which is "slow"?
There are some functions, which are not evaluated at once, like "norme". Symbolic evaluation of M*zoom*gamma takes 11s. Maybe that's the real reason why it takes minutes. __________________________________________________________ After this message, I will re-post the latest version [refactored/augmented]. You are not right about "norme", it is a peanut calculation stored as a new vector. But it is calculated after "rotate(n,v)", stored as new vector as well. My point was that calculation suites execute much faster when included in program. That was explained by MathSoft wrt their Mathcad(s) ... Tom G. [expert in programming] confirmed this assertion well proved by experimenting. Many of those CAS functions are borrowed from various codes. Roughly, one can figure how they rank in speed [machine code, objects, program, modular]. Orient(M) => 0.015 sec [same: numeric/symbolic] Numeric ... eval(augment(col(M*zoom*γ,1),col(M*zoom*γ,2))) => 2 sec As a remark: "stack(,,) is much faster than "augment(,,). Thanks for your interest ... cheers: Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/10/2016(UTC) Posts: 84
Was thanked: 21 time(s) in 17 post(s)
|
Originally Posted by: Jean Giraud My point was that calculation suites execute much faster when included in program.
15% faster?! (0,475/0,418)
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... you are right: my timing of Orient(M) is just the timing to setup the program. It must be compared as per your: augment(col(N:=eval(M*zoom*γ),1),col(N,2))
Thanks for that pertinent remark ! ... cheers, Jean
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.