Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program execution time

Is there a software/website where I can submit my C, C++ and Java codes and get statistics like the program execution time, memory used ? I'm interested in doing a comparision of the same code in different languages and getting an estimate of which data structures/operations are better suited for which language.

like image 665
Appster Avatar asked Dec 06 '22 20:12

Appster


1 Answers

Do it yourself. On a *nix machine (e.g. Linux and OSX) just run from the terminal:

time java YourJavaProgram

or

time ./YourCProgram

On Windows, you can write a little batch script to do the equivalent.

like image 193
Peter Alexander Avatar answered Dec 10 '22 12:12

Peter Alexander