Running simulation code using GEANT4 (large Monte Carlo C++ simulation framework, lots of shared libraries). Compiled and linked GEANT and my app with gold linker and with standard BFD based linker. Looks like gold one is running a bit faster (1'47" vs 1'51"). Could someone shed a light what would be the reason for the difference? Ubuntu 15.04, 64bit, GCC 4.9.2. Run each test about 10 times, lowest time taken, no other activity, one terminal.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- 为什么nfs在不同版本的Linux下安装的文件都不一样
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
As far as the statistics go, lowest time taken is not a valid measure. If you are really curious you need to compute the average time to completion for each program, then divide the difference in the averages by the standard deviation of the pooled sample.
Suppose both programs had the exact same average time to completion, but one always took the same amount of time, the other had huge variation. Picking the one with the single fastest completion would always choose the latter, even though the more consistent program is the one with better performance.
Naturally, different linkers will produce different results, just like different compilers do. The result mostly depends on the optimization options that are enabled (and available) on each linker. Here is one possible reason for the differences you see, but there can be numerous others:
from: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Last but not least: there are many environmental factors that can affect the runtime besides the actual binary content. E.g., cache thrashing can have a considerable effect on the execution time. Also, set of 10 executions is too small for statistical conclusions.