3 ms·
Would a sleep(100000) at the top of the method implementation not count as a bug either?
by baddox 10y ago
Would a sleep(100000) at the top of the method implementation not count as a bug either?
- gkya 10y agoI don't see how this is relevant. That certainly is a bug if such a call is not a part of the algorithm. Here the function is correct in the sense that it returns as expected.
- baddox 10y agoThe function with a long sleep also returns as expected, and is just as much a part of that particular algorithm as the quadratic implementation.
- astrodust 10y agoQuadratic performance is not part of the algorithm. End of story.
- gkya 10y agoI am not your student and this is not a classroom. I really dislike that tone.
- nilved 10y agoHow is that a bug? Unless sleep was a typo or something. A bug isn't related to performance, a bug is just a mistake.