S
S
Sergey Vinogradov2013-11-15 13:01:41
C++ / C#
Sergey Vinogradov, 2013-11-15 13:01:41

Why, when launched through Performance Analysis in Visual Studio, mathematical calculations are performed many times faster than when the application is simply launched?

The point is the following. There is a program that finds the matrix numbers. When testing work on a random matrix of dimensions 200x200 (for example), the calculation takes 6s 23ms. However, if you try to analyze the same code with the standard Performance Analysis in Visual Studio 2012, then getting the eigenvalues ​​of the same matrix takes 1s 30ms. I am completely bewildered. How so? Why is this even possible? The code is written in C#, Visaual Studio 2012 Ultimate, Win7 x64 system - if this information helps.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Vinogradov, 2013-12-13
@genI3

As it turned out, the problem was in the debugging options. After disabling all JIT debugger options and turning off JIT optimization suppression", everything was fixed and began to be considered the fastest.

N
Nikolai Bogdanov, 2013-11-18
@konoplinovich

It is necessary to analyze the compiler options in both cases. You can show?

A
Alexander Vishnyakov, 2013-11-19
@asvishnyakov

Most likely you are using the Debug version and Performance Analysis - Release. And if this is true, then most likely you have some kind of "stupid" bug in your code, the code of which the compiler optimizes in Release.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question