Related meta question, regarding the inverse of this question: Is solely suggesting another solution a bad answer?
See Accelerate OpenGL 2D on Python3 and Finding Primes in Java.
These questions have one thing in common: They are about performance. They worded their question in a manner as "it reaches speed X, but I'd wish it would reach speed Y".
For the first linked question, there are (at the moment of writing) 3 close votes. Maybe 4, depends on how my "leave-open" vote works. Still.
We require that code works before we will review it. This is a good thing, because broken code takes many forms, and most of them inhibit review.
However, when it comes to performance issues, the code works. It's just not fast enough. Often, however, performance optimizations don't come from micro-optimizations - they come from using a different algorithm. I don't have statistics to back me up, but any answer that comes with a different (faster for expected \$n\$) time complexity sounds like a good answer.
That said...
My answer in the second linked question completely trivializes the asker's code. If the asker presents an implementation of algorithm A, and the best answer is "use algorithm B", then surely anything else after that is just a waste? Explaining to someone how algorithm A might be implemented better is a waste of time as they should use algorithm B instead.
For the first linked question: Should questions asking for a better algorithm be closed?
For the second linked question:
Why does reviewing an inferior algorithm still have purpose?