[gecode-users] quick question

Mikael Zayenz Lagerkvist zayenz at gmail.com
Sun Apr 15 15:12:25 CEST 2007


On 4/14/07, penche21 penche21 <penche21 at hotmail.com> wrote:
> - I use Options.java class for benchmarking. The problem is runtimes depends
> on System.nanoTime() method. So, what I get is basically elapsed time for
> program of that time. Is there a way to get the actual user time which does
> not depend on load on my.

There is no possibility that I know of in Java to get user-time.
However, if it were possible I doubt that it would be useful. On my
Windows-machine at least, user-time for a Gecode/J program does not
include time spent in native code, which naturally includes the bulk
of time spent by the program.

I would recommend that you do your experiments on a machine that is as
unloaded as possible, and that you increase the number of samples so
that you get a low enough deviation. Also, the timenogc mode can be
useful. It tries to force Java to do a garbage collection between each
run of the problem, although there is no guarantee.

Also, please remember that Gecode/J is not as fast as Gecode, the
Java-C++ conversions
layer adds quite some overhead.

Cheers,
Mikael

-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/




More information about the gecode-users mailing list