For the outer loop (in debug):
For Array[], you have it, I posted it above.Code:Address Line Trace Source Code Bytes Total % Timer samples
0x41180c 73 for (int i = 0; i < max; i++) 1.17 380
0x411826 74 Array[i] = 12; //12345678; 1.94 633
0x411826 mov eax,[ebp-68h] 8B 45 98 0.00 1
0x411829 push eax 50
0x41182a lea ecx,[ebp-34h] 8D 4D CC 0.60 195
0x41182d call $-000006fch (0x100411131) E8 FF F8 FF FF
0x411832 mov [eax],0ch C6 00 0C 0.60 195
0x411835 jmp $-20h (0x100411815) EB DE 0.74 242
1 file, 1 function, 2 lines, 6 instructions, Summary: 1013 samples, 6.95% of module samples, 3.11% of total samples
There are no samples for Realloc (which would make sense, since it's never called due that I set the size before starting the loop).
If I don't set size, it takes about 400ms longer, but no samples for Realloc. I'm not sure if I'm just using the profiler wrong in this case. I use Codeanalyst in case anyone needs to know.
I found out why it wasn't getting symbols for operator [] in Release. Simple. The compiler inlined the code, saving 1000ms. If I don't, here's the samples for Release:
Code:Address Line Trace Source Code Bytes Total % Timer samples
49 CArrayImpl(T&)::operator [] (DWORD dwIndex)
0x401070 50 { 7.57 399
0x401073 51 if (dwIndex >= m_dwSize) 3.23 170
0x401079 52 Realloc(dwIndex - m_dwSize);
0x401083 53 return m_pArray[dwIndex]; 4.82 254
0x401089 54 } 3.15 166
1 file, 1 function, 6 lines, 0 instructions, Summary: 989 samples, 52.83% of module samples, 18.77% of total samples