Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Add the Needed classes Pin
David Crow18-Feb-06 7:24
David Crow18-Feb-06 7:24 
QuestionCom Port Dropping out Pin
mcb3614-Feb-06 15:51
mcb3614-Feb-06 15:51 
AnswerRe: Com Port Dropping out Pin
Joshua Quick14-Feb-06 17:37
Joshua Quick14-Feb-06 17:37 
QuestionFrame Pane Fixing! Pin
Temp8314-Feb-06 15:16
Temp8314-Feb-06 15:16 
AnswerRe: Frame Pane Fixing! Pin
David Crow15-Feb-06 4:29
David Crow15-Feb-06 4:29 
QuestionBluetooth Connection Pin
mahesh_patil16614-Feb-06 15:16
mahesh_patil16614-Feb-06 15:16 
AnswerRe: Bluetooth Connection Pin
namaskaaram14-Feb-06 18:53
namaskaaram14-Feb-06 18:53 
AnswerRe: Bluetooth Connection Pin
ThatsAlok14-Feb-06 22:30
ThatsAlok14-Feb-06 22:30 
QuestionMouseWheel messages Pin
Ron Weigel14-Feb-06 13:54
Ron Weigel14-Feb-06 13:54 
Questionhow to make multiple documents miltiple views Pin
sourabh27231814-Feb-06 13:37
sourabh27231814-Feb-06 13:37 
QuestionCListCtrl and lParam Pin
t2x14-Feb-06 11:55
t2x14-Feb-06 11:55 
AnswerRe: CListCtrl and lParam Pin
Michael Dunn14-Feb-06 16:41
sitebuilderMichael Dunn14-Feb-06 16:41 
GeneralRe: CListCtrl and lParam Pin
t2x14-Feb-06 22:25
t2x14-Feb-06 22:25 
GeneralRe: CListCtrl and lParam Pin
Michael Dunn17-Feb-06 9:27
sitebuilderMichael Dunn17-Feb-06 9:27 
GeneralRe: CListCtrl and lParam Pin
Dan McCormick15-Feb-06 11:46
Dan McCormick15-Feb-06 11:46 
GeneralRe: CListCtrl and lParam Pin
t2x16-Feb-06 1:19
t2x16-Feb-06 1:19 
GeneralRe: CListCtrl and lParam Pin
Dan McCormick16-Feb-06 6:18
Dan McCormick16-Feb-06 6:18 
QuestionCan STL vector cross DLL boundaries? Pin
unjedai14-Feb-06 8:30
unjedai14-Feb-06 8:30 
AnswerRe: Can STL vector cross DLL boundaries? Pin
Michael Dunn14-Feb-06 10:14
sitebuilderMichael Dunn14-Feb-06 10:14 
AnswerRe: Can STL vector cross DLL boundaries? Pin
Jeff Thompson14-Feb-06 10:17
Jeff Thompson14-Feb-06 10:17 
AnswerRe: Can STL vector cross DLL boundaries? Pin
Stephen Hewitt14-Feb-06 11:28
Stephen Hewitt14-Feb-06 11:28 
AnswerRe: Can STL vector cross DLL boundaries? Pin
Anthony_Yio14-Feb-06 15:37
Anthony_Yio14-Feb-06 15:37 
QuestionStrange variations Pin
hint_5414-Feb-06 8:27
hint_5414-Feb-06 8:27 
AnswerRe: Strange variations Pin
David Crow14-Feb-06 9:46
David Crow14-Feb-06 9:46 
GeneralRe: Strange variations Pin
hint_5415-Feb-06 6:22
hint_5415-Feb-06 6:22 
"QueryPerformanceCounter returns a reasonably accurate rendering of time, at least on Intel platforms. This is because on Intel platforms it returns the contents of a "cycle counter", converted to timing units based on the processor frequency. Because the cycle counter actually counts the number of CPU cycles, it gives a reasonable approximation of real time. However, executing the same loop twice may give different results because the presence or absence of data in the cache will change the number of cycles required to execute the program. So it is at best an approximation, and you have to do some more careful statistical analysis to figure out what is really going on."

This was quoted from the link that you have provided earlier.

Does this mean it is all about cache? If so, please assume the following code then:

int main( void )
{
int *ptr, i;
for ( i=0 ; i<100 ; i++ ) {
ptr = new int;
delete ptr;
}
return 0;
}

So, after "i=0", "i" gets in the cache. After the first time it executs "ptr = new int" "ptr" gets in cache too. From now on, all the 100 cicles will use "i" and "ptr" and these are supposed to be already cached, right? The only thing that I can see that is not cached is "*i", but I never access it directly (or do I? D'Oh! | :doh: ). So, I understand why the first values show a small variation (after the first 4 or 5 cicles it stabilizes), but I still don't understand why those variations keep showing up along the whole test (unless I'm really accessing "*i").

Anyone? Smile | :)

regards

hint_54

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.