• Frugal Cafe
  • Posts
  • FC75: NDepend, biggest allocation coming from O(N^2) algorithm

FC75: NDepend, biggest allocation coming from O(N^2) algorithm

What you're not analyzing could hurt you more

Someone is inviting me to take a look at NDepend, so I downloaded a trial version and captured a trace. Here is the biggest allocation stack at 11.4%:

This seems to be O(N²) algorithm with 3 * N allocation. In the perfect implementation, there should be only a single allocation at most.

NDepend does static code analysis. It seems to be able to generate tons of metrics, but apparently, it’s not doing any performance analysis. What you’re not analyzing could hurt you more.

Here is another warning sign: