Subject: We sit down with her

From: Ellen DeGeneres Looking Better <[email-masked]>
Date: Fri, 29 Aug 2014 06:56:53 -0700

Live With Kelly - Hollywood Edition

Ellen DeGeneres Pics leaked

Recent rumors reported that she got a facelift. That is not true.

Ellen's Story - View_Here.

Wow: Ellen does this every morning in order to look 20-years younger.

Here is the secret she didn't want you to know (or Cover Girl)

It's Amazing.

What did she do to her face?

I'm noticing some strange behaviour

regarding my program. I'm writing it in C++ using Visual Studio

Professional 2013 Update 1 and it consists of an

exe application that links against multiple DLLs and calls

functions that are defined in those DLLs.

In my main program (which consists of several

thousands of lines of code) I call a DLL function (let's call itDLLFunction()) and I calculate the

time taken by that call, like this:

auto beginTime = std::chrono::high_resolution_clock::now(); DllFunction();
auto endTime = std::chro
no::high_resolution_clock::now(); long long totalTime = std::chrono:
:duration_cast<std:
:chrono::milliseconds>(endTime - startTime).count();

What I am noticing is that it takes a much longer time when launching it outside Visual Studio. For example:

Running it indebugwithin Visual Studio with debugger attached -->~50 ms

Running it inreleasewithin Visual Studiowith debugger attached--->~25 ms

Running it inreleasewithin

Visual Studiowithout debugger attached--->~20 ms

Running itoutsideof Visual Studio

(releasebuild) --->~80 ms

As you can see running it in release outside of Visual Studio actually takes

longer than running a debug build

with a debugger attached!

The offending DLL is built within the same solution by the same compiler, and I've double

checked that all DLLs in the directory

from where I launch my application are the right ones.

What could be the reason of such a behaviour?

EDIT 4: It turned out that this slow behaviour appears only if i place the function

call in some part of the code of my main

program, so it must be a problem related to that. It's many lines,

but i'll continue researching.

Thank you for suggestions anyway, they were useful to identificate the problem.

EDIT 3: Measurements with QueryPerfomanceCounter:

The CPU cycles measured inside Visual Studio (~50k) are half of those

outside (~110k) (are those returned by

QueryPerfomanceCounter() actual CPU cycles by the way?).

Dividing it by the frequency shows similar results to the std::chrono ones.

EDIT 2: I checked with process explorer as suggested, the DLLs loaded within

VS and outside VS are identical.

EDIT 1: as requested, i tried this:

auto beginTime = std::chrono::high_resolution_clock
::now(); for (int i = 0; i <
1000; ++i) { DllFunction(); }