Command line EXE is slow, fast in Visual C++ environment

S

spidey

Something weird is happening here... when I run my code from the Visual
C++ environment it is 3 to 4x faster than running the same code from
the DOS command line. Any explanation why is this happening?
 
T

Torsten Mueller

spidey said:
Something weird is happening here... when I run my code from the Visual
C++ environment it is 3 to 4x faster than running the same code from
the DOS command line. Any explanation why is this happening?

Is the executable the same or do you run the Debug version in Visual
Studio and outside the Release one?

T.M.
 
S

spidey

Actually, it is slower when I use command line.
And yes, I'm using the release version in both cases (I have to move it
from the release\ directory before running it).
 
P

Phlip

spidey said:
Actually, it is slower when I use command line.
And yes, I'm using the release version in both cases (I have to move it
from the release\ directory before running it).

How do you know it's slow? Did you add statements to log the times between
critical events? Or does it just "look slow"?

Maybe it's slow because the copy in the Release folder was still in the OS
file cache at run time, so running the program from a different folder
required more disk activity. Either way, the run-time speed should be the
same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top