Hacker News new | ask | show | jobs
by littlestymaar 1087 days ago
That's not a very good exemple because with BB we know the code terminates, by definition. The canonical tong-in-cheek argument is to use the Collatz conjoncture instead (but even that isn't a good example in practice: https://news.ycombinator.com/item?id=21440306)
1 comments

I'm not asking if it terminates, I'm asking when it does. After all it's not much use if the number overflows the universe.
For practical reasons, it's enough to prove that it takes longer than some upper bound, say, 10 ms. The rest is not important.
But that's not something these kinds of tools are supposed do, even with trivial functions… These tools have no idea about the run-time (and there's no way they coule, since it depends on the load you put on the hardware in parallel of running your program)
I agree. There are tools though which are specifically for determining worst-case execution time for e.g. embedded systems which can actually give accurate timing information (upto a point).
Yeah, so these tools will not tell you how long it will take to terminate --- only that it will eventually. In the vast majority of cases, that is what you want to know.