Re: WAM Vs. TOAM
- From: "Neng-Fa Zhou" <nzhou@xxxxxxx>
- Date: Wed, 14 Nov 2007 16:56:47 -0500
"bart demoen" <bmd@xxxxxxxxxxxxxx> wrote in message
news:pan.2007.11.14.20.53.20.32867@xxxxxxxxxxxxxxxxx
On Wed, 14 Nov 2007 10:52:22 -0500, Neng-Fa Zhou wrote:
top :- p(1000,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ; true.
p(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15):-
X1=X15,
NewX1 is X1-1,
mytrue,
p(NewX1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15).
Ok, then use mine and do the timings again - don't be afraid, I am not
insisting on using the less fluffy benchmark to make B-Prolog look bad: I
have done the measurements with the new benchmark of course, so I know
they don't make B-Prolog look worse. But I prefer you to do them.
It takes all Prolog systems the same amount of time to run this program:
0ms:-)
So, is my inderstanding correct that your evidence is the result of
visually inspecting code (yours and other peoples) but there is nothing
hard, like a model you apply and then run it on lots of programs, big
applications, libraries etc. ?
My static profiling of the Aquarius benchmarks indicates that 75% of the
last calls have only up to two frame slots different from their heads. Of
course, some of the last calls are first calls as well because their clauses
are binary. If visually inspecting code is inadequate, we should get the
statistics on first calls as well. This profiling is easier to do in a WAM
implementation, but you get different statistics in different
implementations because it depends on what built-ins are inlined and how
registers are allocated.
Since you mentioned tak, I wonder why B-Prolog constantly outperforms all
the WAM implementations on this program even though, as you know, some WAM
implementations do detect that the key predicate is determinate. Is it
because of the implementation or because of the design?
Cheers,
Neng-Fa
.
- Follow-Ups:
- Re: WAM Vs. TOAM
- From: bart demoen
- Re: WAM Vs. TOAM
- References:
- Re: WAM Vs. TOAM
- From: Neng-Fa Zhou
- Re: WAM Vs. TOAM
- From: bart demoen
- Re: WAM Vs. TOAM
- From: Neng-Fa Zhou
- Re: WAM Vs. TOAM
- From: bart demoen
- Re: WAM Vs. TOAM
- Prev by Date: Re: WAM Vs. TOAM
- Next by Date: Re: WAM Vs. TOAM
- Previous by thread: Re: WAM Vs. TOAM
- Next by thread: Re: WAM Vs. TOAM
- Index(es):
Relevant Pages
|
|