[gecode-users] Profiling examples using the Common Lisp Gecode wrapper

Gustavo Gutierrez ggutierrez at cic.puj.edu.co
Thu Feb 21 16:08:22 CET 2008


On Thu, Feb 21, 2008 at 2:52 AM, Mauricio Toro <mauriciotorob at gmail.com> wrote:
> Hello,
>
> I am doing some profiling to gecode examples under the Common Lisp wrapper.
> For the examples alpha and eq20 it takes around 5 to 10 times more to be
> executed.
> But, when running queens with size = 30 it takes around 100 times more time
> to be executed.
>
> What could be happening?

That could depend on many things. Maybe you are introducing some
overhead by the layer you are developing between CL and gecode, that
is not for free. It may also depends on the CL implementation. My
pinion is to see how much overhead occur when you take the same
problem and change the size, queens is a good example for this. Try
Queens with n=10, n=15, etc. and try to devise some constant relation
between gecode and CL results. That constant relation can give you an
impression f the overhead introduced. If that relation is not constant
maybe there is something wrong with your implementation.

Do not expect to have the same gecode times. Gecode is run as an OS
process and is highly optimized, on the other side you are on the top
of an emulator or virtual machine.

> What other examples should I try?

Try as many examples as you want but try to find a relation instead to
try finding the same results.


As i said before, there can be many things causing that results the
goal then is to quantify how slower is the wrapper compared to
"vanilla" gecode. I would expect to see something like CL = K*G where
CL is the running time of your examples and G is the time spent for
the same problem in gecode. The important thing is K.

Just a hint, be careful you built gecode without debugging support.

Hope this helps,
-- 
Gustavo Gutierrez




More information about the gecode-users mailing list