Answer the question
In order to leave comments, you need to log in
How long does a program run in Python?
I wrote a function that calculates something there! But I ran into a problem if the argument is large, then it's not clear how long it will be executed! I can't figure out what I need to do in Paycharm to see it!
Roughly speaking func(10) - runs instantly
func(100) - already with a slight delay
func(20000) - already costs 20 minutes and nothing. I want to know how long to wait. Or maybe it's pointless and you need to rewrite the whole code? Or maybe somewhere there is something like "until the end is left ..."
Answer the question
In order to leave comments, you need to log in
Unless the algorithm itself provides for the function of informing about the progress of its own execution, then outside it is theoretically impossible to determine at what stage the solution of the problem is and even whether this problem will ever be solved at all.
You should use a debugger.
https://www.jetbrains.com/help/pycharm/2016.1/debu...
something like "until the end is left ..."
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question