Are there any tools that can define code analysis for Big-O complexity?

I did not see anything there, and I suspect the difficulty of defining "n", because, as a rule, there can be more than one or two variables to analyze a complex function to determine.

Are there analysis tools for cyclical complexity, but do they exist for temporal (and / or spatial) complexity? If so, which ones, and if not, why not? Is it really impossible? Impossible? Someone just didn't get around him?

Ideally, it would be something like total complexity for the application (defining the various possible "n" s), as well as for each method in the application

Edit: Thus, it seems that an exact solution is impossible due to

+6
big-o time-complexity code-analysis
source share
4 answers

Unfortunately, this problem is called Stopping problem ...

+11
source share

No, this is not possible, due to a problem with the stop.

If you want to do this to improve your applications, you can consider profiling instead. This will allow you to pinpoint what actually takes the most time. Thus, you do not waste time optimizing the O (n ^ 3) algorithm, which works only on small data sets.

+5
source share

Few words:

Real computers are approximately determinate machines of the final state, so the problem of stopping is not really a practical limitation. A practical limitation is an algorithm that takes longer to run than you expect to expect, excluding any brute force analysis methods.

To get a general idea of ​​the complexity of an algorithm, you can always run it on a variety of random inputs and measure time. Then draw a curve through the data.

Analysis of the time complexity of the algorithms can be quite complex, requiring some creative steps. (See, for example, quicksort analysis). The problem is closely related to the proof of the logical theorem and verification of the program. It would be possible to create a useful tool that allows a semi-automatic solution to complexity, i.e. A tool that systematically searches for solutions, given clues from a person, but this, of course, is not easy.

+1
source share

I've never seen a tool for this, but we use profiling tools to better understand where the bottlenecks are. This is not always obvious, and I was several times surprised at those things that, as I thought, occupied very little for a long time and vice versa. In the .NET world, I used ANTS and JetBrains .

0
source share

All Articles