getrusage()
What is that exactly (what OS).

that's a very useful site, and I'm pleased to say i'm already doing what they suggest (I'm testing the most expensive parts of my program and seeing how long it takes to do it, from that information I can estimate how many times per second each part of my program can run...this gives me a good idea of how expensive each part of my program is).

Salem (or anyone else) can you give me names of win32 api functions I can use to check performance (other than GetTickCount() and timeGetTime, I mean like how can I grab the amount of memory being used at that particular instant, all I need is names then I head over to msdn).

The intent is to save time by not initializing x if it's already zero. In reality, the test to see whether it's zero or not will take up about as much time as setting it to zero itself would have.
x = 0;
Stuff like that i am already aware of, that it is too expensive to test to see if the variable is initialized or not, its better to just initialize anyway.