why cuda code runs much slower when -rdc=true is specified
<p>I have many class that written in .h and .cu, so I tried the relocatable device code(<strong>-rdc=true</strong>). It cost about 12 seconds. Then I tried to combine the code, use header only classes and remove the <strong>-rdc=true</strong>, it took only 2 seconds.</p>

<p>What the code does is sha1(some string) 0x40000 times, which is used in winrar encryption. </p>

<p>Why is that? It's ok for now, but my project will become larger and separate compilation would be useful. Is it normal behavior that <strong>-rdc=true</strong> can slow down the performance?</p>