SMath Studio Forum
»
SMath Studio
»
Questions
»
how to improve calculation speed here?
Rank: Member Groups: Registered
Joined: 12/03/2019(UTC) Posts: 19 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 47 time(s). ts.xmcd (61kb) downloaded 14 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/12/2011(UTC) Posts: 321 Location: italy Was thanked: 110 time(s) in 94 post(s)
|
By setting the formulas with the numeric optimization option switches from 29s to 19s. Still away from your expectations sergio
|
|
|
|
Rank: Member Groups: Registered
Joined: 12/03/2019(UTC) Posts: 19 Was thanked: 1 time(s) in 1 post(s)
|
16 more equally good improvements and it is solved... Thank you Sergio
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 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 18 time(s). Stat Histogram QUICK.sm (58kb) downloaded 16 time(s).
|
|
|
|
Rank: Member Groups: Registered
Joined: 12/03/2019(UTC) Posts: 19 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 28 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 24 time(s).Have a nice weekend! Johannes
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 279 Was thanked: 92 time(s) in 58 post(s)
|
This is the function I use for sampling from normal distribution. speed-lyles.sm (18kb) downloaded 23 time(s). |
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 28/01/2023(UTC) Posts: 3
|
Hi All,
I am new here, and facing similar problems. I intend to replace MathCad to an alternative solution due to PTC's pricing and support policy. I was very happy to find SMATH, and I started to test it. For short calculations it's a good alternative, but it seems very-very slow when long iterations are needed. I made a short loop both in Mcad and Smath containing just a few multiplications, and calculating it 1000000 times took ~0.2s for Mcad14, ~1s for Mcad8, and 32s for SMATH. So now I am a bit upset...
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 279 Was thanked: 92 time(s) in 58 post(s)
|
Care to share your .sm file?
Sometimes the are improvements to be made in how algorithms are structured. |
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Originally Posted by: evsp For short calculations it's a good alternative, but it seems very-very slow when long iterations are needed. In some instances, Smath is slightly faster than Mathcad 11. However, almost not observable. In other instances, Smath is horribly slow. 1 min Julia in Mathcad takes over 2 hrs in Smath Same observation Fourier CoC ... and more. Please, attach your document for Smath Community to doctor. Jean
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Originally Posted by: Jopi 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) Your document does not open 'incorrect format'Visit Wikipedia for Histogram. Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
SMath may not be fastest among them. But some tricks can be applied. It may improve calc speed slightly. Regards
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 28/01/2023(UTC) Posts: 3
|
speedtest.sm (5kb) downloaded 17 time(s).This is the file I made exclusively for speed check. There is no need to improve this calc by modifying it's structure, it is just for test purposes not a real task. I started to use Mathcad in the last century (V6.0). I made several calculations for example to simulate transient temperature rise of electrical rotating machines. I know there are better tools but I am familiar with MathCad that's why I am looking for a similar sw.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Originally Posted by: evsp it is just for test purposes not a real task.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Originally Posted by: evsp I made several calculations for example to simulate transient temperature rise of electrical rotating machines. Attach your experimental data set. Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Originally Posted by: evsp it is just for test purposes not a real task. And speed of your test code fails under SMath drastically. But we all know these issues. For huge iterations SMath is not useful. Anyone who plans to use this software should know this, SMath is a one-man show. There are no paid programmers who can give all their time to SMath. Only a handful of developers are included in writing and enhancing the code. And they are doing this in their spare time, without any charge. Maybe Andrey improve iteration speeds in future, who knows. We can request something, it is up to Andrey include or improve that. It is what it is, a free software which gives us mathcad interface. Reagrds
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 28/01/2023(UTC) Posts: 3
|
"Anyone who plans to use this software should know this"
Yes, sure. I installed SMath 3 days ago, and now I am checking it's usability for my tasks.
And many respect to Andrey! In the last few days I also found many points where SMath is superior to MathCad.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 279 Was thanked: 92 time(s) in 58 post(s)
|
Originally Posted by: evsp speedtest.sm (5kb) downloaded 17 time(s).This is the file I made exclusively for speed check. There is no need to improve this calc by modifying it's structure, it is just for test purposes not a real task. I started to use Mathcad in the last century (V6.0). I made several calculations for example to simulate transient temperature rise of electrical rotating machines. I know there are better tools but I am familiar with MathCad that's why I am looking for a similar sw. Just for demonstration purposes, I've been able to increase the speed of this calc ~25% on my machine just by using vectorization rather than the for loop. It's still not near the performance you'd like, but just goes to show there are often things to be done to improve calculation speed. Vectorization isn't always possible in some algorithms, but when it is, it's generally faster. speedtest.pdf (36kb) downloaded 16 time(s). speedtest.sm (9kb) downloaded 12 time(s). |
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Originally Posted by: evsp And many respect to Andrey! In the last few days I also found many points where SMath is superior to MathCad. In few days, imprudent to glorify the unknown yet.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Originally Posted by: evsp In the last few days I also found many points where SMath is superior to MathCad. You can't be more correct. SMath may be behind than MathCad speed-wise. But in terms of usability, features, visual aspects SMath is way better. Just plugin support is a huge plus single alone.
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
how to improve calculation speed here?
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.