I have a question about analyzing the asymptotic runtime complexity of a few short snippets of code in Ruby. I made a rough analysis of the complexity of the code snippets, but another user disagreed with my analysis, so I wanted to ask the community at large about what the correct complexity is.
I was wondering on which Stack Exchange site such a question should be asked:
According to What topics can I ask about here?, questions about "software algorithms" can be asked.
StackOverflow looks like it might be a good fit because it involves specific lines of code in a specific language, Ruby.
I checked What topics can I ask about here?, and it says "algorithm and data structure concepts". I already understand the general concepts of asymptotic complexity analysis, I learned it in college. I'm just asking about the complexity of a specific instance of code, so I don't think my question belongs on Programmers, correct?
What topics can I ask about here? says "This site covers theoretical and applied computer science at any level, including but not limited to...algorithms, models of computation". I can ask about applied computer science, so this looks like it might be a good fit too. Yes, my example code is in Ruby, but my analysis of its runtime complexity isn't necessarily tied to individual Ruby methods and implementation, it's actually kind of language-agnostic.
What topics can I ask about here? says: "Code Review Stack Exchange is for sharing code from projects you are working on for peer review. If you are looking for feedback on a specific working piece of code from your project in the following areas...Performance". My question is related to the performance of a specific piece of Ruby code. But I'm more interested in verifying if my asymptotic analysis of it is correct, rather than trying to improve the performance, but of course finding a way to improve the performance to
O(n log n)instead of
O(n^2)would be a nice bonus.
Code Review has a single Complexity tag with just 28 questions tagged.
So based on the above, Programmers seems like the least appropriate place to post my specific question. But I'm very unsure of which of the other three Stack Exchange sites would be a better fit.