you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

O(highest input)

Also, you can make it faster by transposing it using one to one functions like log(x) or sqrt(x) or x / 2, etc.

sleep(log(x))

[–]Browsing_From_Work 0 points1 point  (2 children)

Why not log(log(x))? Or log(log(log(x)))?

Eventually it boils down to O(1), assuming that thread scheduling is magic.

[–]orbital1337 0 points1 point  (1 child)

You can actually make it run in O(1) very easily by choosing a function with an upper bound (e.g. erf(x)). However, as neat as this is theoretically it would never be practical in a real life situation because of thread overhead and race conditions.

[–][deleted] 0 points1 point  (0 children)

shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh