I\'m writing a library for WebWorkers, and I want to test the difference between running a script in the main page thread, versus in one or more workers. The problem is: I can\'
For some reason Bogosort comes to mind. Basically it's a sorting algorithm that consists of:
while not list.isInOrder():
list.randomize()
It has an average complexity of O(n * n!)
with little memory, so it should slow things down pretty good.
The main downside is that its running time can be anywhere from O(n)
to O(inf)
(though really, O(inf)
is pretty unlikely).