1
\$\begingroup\$

Do you think is ok to answer your own question with a "minor" optimization?

Note: this is a different case from that question because there is no previous answer and I am not aggregating suggestions.

Naive parallel Sieve of Eratosthenes in Java

I found in my own code space for optimization. Actually it could double the speed of the code for huge numbers but would not affect significantly small numbers. Until now, the question did not have any answer. Adding a comment would be very complex because the change was not marginal.

So, I posted my answer but I am still not sure if was a fair/good move.

\$\endgroup\$
4
  • \$\begingroup\$ I do believe this is kind of different case : no other answer, no aggregating previous answers, etc. \$\endgroup\$
    – rdllopes
    Jun 15 '16 at 9:52
  • 7
    \$\begingroup\$ How to answer your own questions doesn't change based on whether it has current answers. As long as your answer is a good answer it is fine. The only difference when you don't have any answers yet is that you can (instead) simply edit the question. In your particular case, your answer is good and well-written and useful, so it's absolutely fine. \$\endgroup\$
    – Kaz
    Jun 15 '16 at 9:54
  • \$\begingroup\$ Nice to know @Zak. \$\endgroup\$
    – rdllopes
    Jun 15 '16 at 9:57
  • 5
    \$\begingroup\$ As @Zak says, based on the fact that your answer is instructive, I think you made the right move. \$\endgroup\$ Jun 15 '16 at 10:09

Browse other questions tagged .