sum over range is terribly slow

sum over range is terribly slow - Mensajes

#1 Publicado: 28/3/2018 4:48:19
Ave Zoid

Ave Zoid

0 me gusta en 3 mensajes.

Grupo: User

debug.sm (12,2 KiB) descargado 1159 vez(es).

While doing a sum on a floating-point range I have realized simple SUM(4) cannot be directly used
It requires translation of FP range into the integer range, which is basically a hack.

Doing a sum over the FP range in a loop is terribly slow - any ideas why?


sum_over_range.jpg
#2 Publicado: 28/3/2018 5:04:43
NDTM Amarasekera

NDTM Amarasekera

130 me gusta en 352 mensajes.

Grupo: User

Use Optimization --> Numeric on the function.
(R/Click on the function, select Optimization ---> Numeric.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#3 Publicado: 28/3/2018 5:38:37
Ave Zoid

Ave Zoid

0 me gusta en 3 mensajes.

Grupo: User

Wrote

Use Optimization --> Numeric on the function.
(R/Click on the function, select Optimization ---> Numeric.



That worked. Thanks!
#4 Publicado: 28/3/2018 9:28:35
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

Doing a sum over the FP range in a loop is terribly slow - any ideas why?



I don't see that here. "for loop" is always the winner. deeper @ kernel level.

debug [doctored].sm (12,28 KiB) descargado 981 vez(es).

debug.PNG
#5 Publicado: 29/3/2018 9:30:19
Ave Zoid

Ave Zoid

0 me gusta en 3 mensajes.

Grupo: User

Wrote

Wrote

Doing a sum over the FP range in a loop is terribly slow - any ideas why?



I don't see that here. "for loop" is always the winner. deeper @ kernel level.

debug [doctored].sm (12,28 KiB) descargado 981 vez(es).

debug.PNG



AS NTDMA has suggested, Numeric Optimization did the trick. Its was purely to do with my incompetence.
  • Nuevos mensajes
  • Sin mensajes nuevos