Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Jopi  
#1 Posted : 10 January 2022 13:27:12(UTC)
Jopi


Rank: Member

Groups: Registered
Joined: 12/03/2019(UTC)
Posts: 19
Germany

Was thanked: 1 time(s) in 1 post(s)
Hi all,
I have two files here, one in smath, one in mathcad.
The mathcad file is calculated about 1000 times faster, does anyone have a tip how to speed up the .sm file?

ts.sm (20kb) downloaded 26 time(s). ts.xmcd (61kb) downloaded 7 time(s).
Offline PompelmoTell  
#2 Posted : 10 January 2022 15:24:28(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 285
Man
Italy
Location: italy

Was thanked: 101 time(s) in 85 post(s)
By setting the formulas with the numeric optimization option switches from 29s to 19s. Still away from your expectations
sergio
Offline Jopi  
#3 Posted : 10 January 2022 15:42:53(UTC)
Jopi


Rank: Member

Groups: Registered
Joined: 12/03/2019(UTC)
Posts: 19
Germany

Was thanked: 1 time(s) in 1 post(s)
16 more equally good improvements and it is solved...
Thank you Sergio
Offline Jean Giraud  
#4 Posted : 10 January 2022 17:37:19(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,887
Canada

Was thanked: 876 time(s) in 704 post(s)
OFF topic of the speed, I don't understand your histogram.
Histogram take raw data from collection, ultimately to get a PDF.
Cheers ... Jean.

Stat Histogram DEMO.sm (24kb) downloaded 7 time(s).
Stat Histogram QUICK.sm (58kb) downloaded 7 time(s).
Offline Jopi  
#5 Posted : 14 January 2022 19:28:39(UTC)
Jopi


Rank: Member

Groups: Registered
Joined: 12/03/2019(UTC)
Posts: 19
Germany

Was thanked: 1 time(s) in 1 post(s)
Hi Jean,
Sorry for the delay, unfortunately I found no time...

I have attached my histogram again, revised it a bit and commented it.
Actually I think it does exactly what it should, but I have to admit
that I don't know the exact definition of a histogram 8)

Histogram_JP.sm (19kb) downloaded 13 time(s).

And again about the speed: I played a little with my definition of "rnorm"
and come to the strange result that my vector is calculated fastest when
I calculate it in pieces of 20 elements.
I would be happy if a more experienced user could explain this to me.

speed.sm (18kb) downloaded 10 time(s).

Have a nice weekend!
Johannes
Offline alyles  
#6 Posted : 14 January 2022 21:10:20(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 225
United States

Was thanked: 76 time(s) in 47 post(s)
This is the function I use for sampling from normal distribution.

speed-lyles.sm (18kb) downloaded 15 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Users browsing this topic
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.