Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
35 Views

passing large array to subroutines and speed-up

Dear all,

I have a question about code speed due to different strategy in passing array to subroutines.

Recently, I have rewritten an old code where only small arrays are passed to subroutines. In my new version, I usually pass all the array with modules.

Unfortunately, I have noticed that my new version of the code is very very much slower than the initial version. I am wondering if this is due to the new way in passing the arrays to subroutine or if the problem is related to something else.

Really, Really

Thanks

0 Kudos
2 Replies
Highlighted
Black Belt Retired Employee
35 Views

Something else, probably. Obviously you changed more than just how arrays were passed in. You've now made them global module variables and taken them out of the argument list? In that case there is no "passing" at all.

The usual advice is to do performance analysis using a tool such as Intel Vtune Amplifier XE and see where the program is spending most of its time. In most cases it's not where you think.

0 Kudos
Highlighted
Beginner
35 Views

Dear Steve,

I will check with the Intel Vtune Amplifier XE.

Thanks a lot for the suggestion.

0 Kudos