Darkness3477
March 16th, 2007, 09:25 AM
Hi, I made a program today that adds +1 to i while i doesn't = 100000000 (So it counts up to 1000000000) just to see how fast it does it. And, well, it's pretty fast.
So, I'm just wondering how I could go about timing it so I can see exactly how fast it is.
It's not very important I do this, I was just curious as to exactly how fast (Other then extremely fast) my computer computes simple operations.
So, I know you can do this somehow, I'm just not sure how. Whether you need to write it into the program or your can time how long it takes a program to execute from the command line. Either way, some information would be useful.
Hopefully it's through the command line, and I can do this with any program (Not just executables, but python scripts) so I can compare the difference. As said, I'm interested in this and don't *need* to know it other than to satisfy my own curiosity.
Thanks for any help you guys can give.
P.S. I've tried searching google and couldn't find anything helpful, perhaps I'm asking(searcching) the wrong things.
P.S.S My program is in C++
So, I'm just wondering how I could go about timing it so I can see exactly how fast it is.
It's not very important I do this, I was just curious as to exactly how fast (Other then extremely fast) my computer computes simple operations.
So, I know you can do this somehow, I'm just not sure how. Whether you need to write it into the program or your can time how long it takes a program to execute from the command line. Either way, some information would be useful.
Hopefully it's through the command line, and I can do this with any program (Not just executables, but python scripts) so I can compare the difference. As said, I'm interested in this and don't *need* to know it other than to satisfy my own curiosity.
Thanks for any help you guys can give.
P.S. I've tried searching google and couldn't find anything helpful, perhaps I'm asking(searcching) the wrong things.
P.S.S My program is in C++