How to measure java performance on i7?

I am trying to make a typical "A / B testing" approach, similar to the two options for implementing a real algorithm, using the same dataset in both cases. The algorithm is deterministic in terms of execution, so I really expect the results to be repeatable.

In Core 2 Duo, this is also the case. Using only the linux time command, I get changes in runtime of about 0.1% (more than 10 starts).

On i7, I get all kinds of variations, and I can easily have 30% of the variations up and down from the average. I guess this is due to the various CPU optimizations that i7 does (dynamic overclocking, etc.), but it really makes it difficult to do such testing. Is there any other way to determine which of the two algorithms is β€œbest,” any other reasonable metrics that I can use?

Edit: The algorithm is not supported for a very long time, and in fact this is the real scenario that I am trying to execute. So multiple re-execution is not really an option.

+3
source share
4 answers

, BIOS. , .

+3

, . , , : - Java?

, , . . , , . , .

, Hyper-Threading. BIOS , .

0

linux , .;)

You need to make the test as realistic as possible. For example, if you run the algorithm and enter the average result, you can get very different results from performing the same tasks every 10 ms. that is, I saw a change from 2 to 10 times (between flat and relatively low load) even with a locked clock frequency.

0
source

All Articles