Most online judges have some sort of system to measure execution time and memory consumption. An example is shown here. How is it done? Is there a simple UNIX utility I can use to run similar tests on my own programs?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Valgrind with all it’s tools will give you some info:
cachegrind– a cache simulatorcallgrind– call graph tracing – allows to get the cost of calls and show what is happening in your programmassif– info about heap memory usagememcheck– memory leak checkingIn addition you can use more sophisticated software, like Intel VTune.
If you are interested in low level details and the real hardware counters yourself then have a look at the perfmon2 which has some chances of getting into mainstream kernel some time in the future.
And search old questions – there are many posts on this subject.