Re: [eclipse-users] profiling constraint code

From: Kish Shen <kisshen_at_...5...>
Date: Tue, 28 Aug 2007 01:22:44 +0100
Hi Malcolm,

Malcolm Ryan wrote:
>
> Is there any way to get more useful profiling information about the  
> constraint system? I don't mean to be rude, but being told that 50%  
> of my time is being used in the core propagator is like telling me  
> that 50% of the time in a C program is spent executing statements.  
> Which ones?
>
> Malcolm
>
>   
Since you have not had any other replies yet, I thought I will get the 
ball rolling by replying first,
although I am not that familiar with the implementation of the IC library...

I am not sure profiling information for constraints are particularly 
useful. On a practical front, there
is often not a simple relationship between the implementation of the 
constraint and the constraint
itself, i.e. a constraint is often not simply implemented as a goal. So 
it is difficult to relate what is
actually implemented (e.g. the propagator, and the various delay goals) 
to the actual constraints.

Secondly, even if you can accurately profile the constraints, it is not 
clear to me if this is that
useful. The actual time spent on executing a constraint is not 
particularly interesting. What is
interesting is how much of the search-space the constraint is able to 
reduce, i.e. how much
computation you are able to avoid. For constraint satisfaction problems, 
it is probably more
important choosing the algorithm/heuristic chosen to label the 
variables. It may help to look at
how the propagation is performing to guide the improvememt of your 
program -- this can be
done with visualisation tools.

The IC library does provide facilities to gather statistics about the 
solver. This is described in
the 'Obtaining Solver Statistics' section of the IC chapter of the 
Constraint Library Manual.

Cheers,

Kish
Received on Tue Aug 28 2007 - 01:22:53 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST