jalgorithm icon indicating copy to clipboard operation
jalgorithm copied to clipboard

Make a project that calculates the execution time of Jalgorithm. the project should be able to demonstrate Jalgorithm's superiority by real data and charts. use JFreeChart for that

Open mohammadkarbalaee opened this issue 3 years ago • 2 comments

mohammadkarbalaee avatar Jan 11 '22 06:01 mohammadkarbalaee

Hi, As Muhammad mentioned during last meeting and as per https://stackoverflow.com/questions/3382954/measure-execution-time-for-a-java-method there is no easy way, to measure program performance exactly, because it depends on so many different factors (e.g. hardware, other software running on the same system, just-in-time and hot-spot compilation, input data etc.) So we would need an isolated machine/environment in always the same pure state, which is rather impossible. However I believe we don't need to have precise time measurement of executions, it just should allow us to compare specific implementations (addressing exactly the same algorithmic exercise with the same input data sets). I mean that we could determine how much in per cents the one implementation is faster/slower than the other one, but only at rough level. We will not be able to differentiate reliably close implementations as it depends on so many things even connected with the sheer JVM and imponderabilia of codes. Please see at JMH https://github.com/openjdk/jmh , http://tutorials.jenkov.com/java-performance/jmh.html and share your thougts.

Best,

cklimkowski avatar Jan 12 '22 18:01 cklimkowski

Hi Cyprian,

I think reporting an approximate percentage is enough, since developers just tend to know that what they are using is the fastest available and they don't care about the precision.

The project that you linked to seems to be a good option for what we need. We'll probably use it for this task. thanks for your thoughts and sharing that project Cyprian.

mohammadkarbalaee avatar Jan 13 '22 03:01 mohammadkarbalaee