+ 5

Calculation of the efficiency of a program?????

can we write a code which calculates the efficiency of a given program???

17th Feb 2017, 10:44 AM
CSK
1 Respuesta
+ 1
it depends on what you are doing. a sorting algorithm? trees?... you could implement "timestamps" before a process and after. then find the difference and print it out. it will be in milliseconds... so id you have more than one way of doing something. time would help. but dont run it once, run it ten times and find the average time.... most everything has some sort of "this will run in ln(n)" or n*ln(n) or n^2 time. but it depends...
19th Feb 2017, 7:29 PM
Michael Szczepanski
Michael Szczepanski - avatar