Continuing from my previous post on performance analysis of algoritms, I decided to plot the CPU-time over the size of the problem, that is, the number of cells.

The two graphs above, both plotted ‘log-log’, demonstrate a straight line. A straight line on a log-log plot is a clear signature of a Power-law, that is, something growing with the power of something else.

So, the blue line in the two graphs above shows the actual measured data points, i.e. results from my simulations. The red line show my attempt to fit a power function to the simulation data.

As can be seen from the plots, the data and the mathematical function concur almost perfectly.

Conclusions ? Obvious. The execution time of the simulation is dependent by power of 4 on the side of the matrix, and by power 2 on the number of cells.

In the next post, I will show how to improve – optimize – the performance of the simulation.

(btw, I’m very proud of the LaTex legends in the graphs! 🙂

### Like this:

Like Loading...

*Related*

## About swdevperestroika

High tech industry veteran, avid hacker reluctantly transformed to mgmt consultant.