- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
I will check with the Intel Vtune Amplifier XE.
Thanks a lot for the suggestion.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page