c++ - Launching the program from Visual Studio debugger is faster than launching it from outside -
summary:
i saw when ran program visual studio (f5), pair of multiplications took around:
x64: 3.8~ ms
win32: 4.5~ ms
however when ran outside took:
x64: 6.59~ ms
win32: 6.62~ ms
does have idea why happening?
more info:
i wanted test matrix multiplication speed of glm library , iterating on number of them hash map, vector , array. (to calculate transformation matrices rendering)
so, using queryperformancecounter, tested 50000~ multiplication pairs 1000 times average timing. (default visual studio 2013 empty project release configuration)
normally 1 expect program faster when ran outside of visual studio, tried again setting program priority programmatically, made no difference.
to give idea example loop looks this:
timer.start(); (int j = 0; j < 1000; j++) { (int = 0; < objectsvector.size(); i++) { if (objectsvector[i]->mmeshrefid > 0) { results[i].worldtransformationmatrix = objectsvector[i]->getworld(); results[i].mmeshrefid = objectsvector[i]->mmeshrefid; } } } timer.gettimediff();
if wanted take @ or try full code link here: https://www.dropbox.com/s/xilydyvp3lublrk/matmult.zip
p.s: found link, think irrelevant because have no dlls: program runs slower when launched outside of visual studio
p.p.s: 2 windows 8 pcs gave same results, while timings same under windows 7 pc (ran little slower (0.8~ms) visual studio, should case)
more: replaced glm own code represents matrices float array, while timings better, running visual studio still faster. still don't know how achieve speed outside visual studio.
Comments
Post a Comment