2019-04-03 05:48 PM
Solved! Go to Solution.
2019-04-04 11:12 AM
min_value = somevalue[1] FOR i = 2 TO VARDIM1(somevalue) min_value = MIN(min_value, somevalue) NEXT i
2019-04-03 09:40 PM
min_value = 1000 FOR i = 1 TO VARDIM1(somevalue) min_value = MIN(min_value, somevalue) NEXT i
2019-04-04 07:23 AM
check_min = 1000000 !!some value larger than your expected minimum FOR i = 1 TO VARDIM1(somevalue) min_value = MIN(somevalue[1], somevalue) !!always check against first array value if min_value < check_min then check_min = min_value !!reset check_min to min_value endif NEXT i
2019-04-04 11:12 AM
min_value = somevalue[1] FOR i = 2 TO VARDIM1(somevalue) min_value = MIN(min_value, somevalue) NEXT i
2019-04-04 11:48 PM
2019-04-16 03:46 PM
for __i = 1 to vardim1 (somevalues) step 1 !<-- step 1 is a redundancy to prevent errors in your code put somevalues[__i] !<-- puts all you values' array in the memory stack next __i min_value = min (get (nsp)) !<-- 1. Empties values from the stack to the min function !<-- 2. funtion export lowest value to parameterdon't forget to check GDL code style
2019-04-16 03:58 PM
2019-04-16 06:59 PM
Moonlight wrote:Comparing techniques between languages is not necessarily very helpful because they often vary too greatly in functionality and optimisation.
1. In Python, your proposed methods are considered to be similar to "lazy function", while mine is considered "eager" ... what is the impact of each method on the performance ? (considering that this method is applied with in the same GSM file)
2019-04-16 07:47 PM
2019-04-17 10:56 AM
Moonlight wrote:How would it be able to iterate over fewer values?
since the iteration will always be of a reduced number, I don't think that this will be of an issue.
Moonlight wrote:Just make a function in an object to iterate over the method thousands of time when a parameter is set/changed, time numerous runs and then average.
What I'm asking, if there is a way to measure the performance of both methods?