Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

recursive subroutines and significant slow down

$
0
0

I am working on a code that is used as a user-subroutine for a commercial finite element software. The code gets compiled to a dll file and loaded by the commercial software during runtime. The code consists of complex data structures and tens of subroutine calls. 

Recently I have applied some modifications to the code to make it thread safe (changes include turning subroutines to recursive, etc.) 

The modified code works as fast as old code when compiled and run under linux environment (see https://software.intel.com/en-us/comment/1799692#comment-1799692) . 

But under Windows, the modifications have led to significant performance drops (~3 times slower). 

I suspect the difference come from the fact that switching subroutine to recursive, turns its memory allocation from static to stack and memory allocation leads to slow down. What I don't understand is the same code runs as fast as the old code under linux but 3 times slower than the old code under windows. 

Suggestions on how to improve the performace is highly appreciated. 

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>