Curious performance results...

From: Ludovic Langevine <Ludovic.Langevine_at_irisa.fr>
Date: Wed 06 Jun 2001 04:49:19 PM GMT
Message-Id: <200106061651.SAA24585@nimbus.insa-rennes.fr>
Hi,

I am measuring (time) performance of several clp(fd) programs (mostly using ## constraint). I have got curious and systematic results : performances with Eclipse 5.1.3 
are worse than with Eclipse 4.1 (about 10%).

For example, with the following n-queens program :
-----------------------------
:- lib(fd).

nqueens(N, L):-
	length(L, N),
	L :: 1..N,
	safe(L),
	ud_labeling(L).

safe([]).
safe([X|L]):-
	noattack(L, X, 1),
	safe(L).

noattack([], _, _).
noattack([Y|L], X, I):-
	X ## Y,
	X ## Y + I,
	X ## Y - I,
	I1 is I+1,
	noattack(L, X, I1).

ud_labeling([]).
ud_labeling([X|L]):-
	indomain(X),
	ud_labeling(L).
-----------------------------

goal : profile(setof(L, nqueens(12, L), _))
Eclipse 5.1.3 : user time = 36.1s
Eclipse 4.1 : user time = 32.2s
(reproductible within 1%)

My test script is :
:- nodbgcomp.
[nqueens].
profile(setof(L, nqueens(12, L), _)).     (10 times)

I'm working with a lowly loaded Sun Ultra 5 (Solaris 7). I have also tried with a Sun Ultra 250.

I'm really surprised by these results... any idea ?

Thanks in advance,
Ludovic
Received on Wed Jun 06 17:51:36 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:09 PM GMT GMT