+ 1
How to find time efficiency?
Though our code has give us a solution...there is a factor(time efficiency) has diffentiate our code with others..How can we obtain a code with good time efficiency
3 Réponses
+ 1
Can you say for Python
+ 1
import time
start = time.process_time()
#code_here
end = time.process_time()
print(end-start, "seconds")
0
If you're asking how to write code with good time efficiency you do it by writing efficient code using efficient algorithms.
If you're asking how to time your code, that depends on the language. Here's how to do it in C++:
http://www.cplusplus.com/reference/chrono/high_resolution_clock/now/