Memory Allocation
Hi, I was just timing the "new" function of the CRT. Everything is good, using the hi-res timer. However, for some reason the Retail build is MUCH slower then Debug. Seems counter-intuitive, I''d like to think, no? But does anyone know for sure, or have any ideas why this is?
my test is simple:
int * x[5000];
for( i = 0; i < 5000; i++ ) {
x = new int;
}
this is the only code I''m timing and I get:
Retail: Cycles needed: ~1118000
Debug: Cycles needed: ~611000
This is almost 1/2 the # of cycles? I''m using a PIII 850, 512MB. My current thinking is that the CRT (C-runtime) is does special allocations for debug-headers and what not...but that this "cacheing" could possibly be the source. I''m most likely way off the mark.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement