9
1
The task is simple, post 2 code snippets that perform the same task, where one seems very optimized at first glance, but actually is significantly slower than the other.
Only one rule:
- Both snippets must finish with the exact same output (for the same given input, if any).
1Without choosing a specific task, I think this is way too broad to be interesting. You should also specify if both snippets have to use the same language. – Dennis – 2015-07-06T04:49:27.323
@Dennis yeah it might be too broad, I just wanted to see some creative approaches. Also there is no restriction on languages, so that one can get more creative freedom. – vrwim – 2015-07-06T04:52:04.973
9Creative freedom doesn't lead to creative answers. It requires a lot more creativity to solve a difficult task than an easy one. – Dennis – 2015-07-06T04:57:13.330