Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Jean Giraud  
#1 Posted : 02 July 2017 18:56:33(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

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).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline MarB  
#2 Posted : 03 July 2017 10:40:06(UTC)
MarB


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.

augment_screen.PNG
Offline Davide Carpi  
#3 Posted : 03 July 2017 11:28:43(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: MarB Go to Quoted Post
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
Offline Jean Giraud  
#4 Posted : 03 July 2017 15:02:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: MarB Go to Quoted Post
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
Offline MarB  
#5 Posted : 03 July 2017 15:39:42(UTC)
MarB


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 Go to Quoted Post

My point was that calculation suites execute much faster when included in program.

15% faster?! (0,475/0,418)
augment_screen2.PNG
Offline Jean Giraud  
#6 Posted : 03 July 2017 16:10:08(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

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
Users browsing this topic
Guest
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.