3 ms·
How do you eliminate stuff that is slow just for the sake of being slow? For example, a find_in_list function that iterates through the list N! times to 'protec
by hueving 12y ago
How do you eliminate stuff that is slow just for the sake of being slow? For example, a find_in_list function that iterates through the list N! times to 'protect against cosmic rays' or something along those lines.
- Ygg2 12y agoBy requiring to terminate and return a result?
- minikomi 12y agoOf course. Just test to see if the program terminates or not.
- Ygg2 12y agoWhile halting problem can't be solved, you can solve the problem by saying all programs must terminate within 20min and program must scale with input length. And/Or you can forbid sleep and similar nop functions. And/Or you can sit down and analyze the code. Truth be told, it makes for a very boring competition, but a very useful exercise.