Re: WAM Vs. TOAM




"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


.



Relevant Pages

  • Re: WAM Vs. TOAM
    ... insisting on using the less fluffy benchmark to make B-Prolog look bad: ... the WAM implementations on this program even though, as you know, some WAM ... tak = 328 ...
    (comp.lang.prolog)
  • Re: WAM Vs. TOAM
    ... The definition of mytrue is simply: ... Can we agree on this new code as the benchmark to base the future ... I still believe that TOAM is better than WAM in general for CLP but not ... I am more convienced than before after I finished B-Prolog ...
    (comp.lang.prolog)
  • Re: WAM Vs. TOAM
    ... The definition of mytrue is simply: ... Can we agree on this new code as the benchmark to base the future ... insisting on using the less fluffy benchmark to make B-Prolog look bad: ... when the designs are so close ...
    (comp.lang.prolog)
  • Re: Commercial uses of prolog (to convince my boss its valid)
    ... I have uploaded a new package, which includes all the benchmark programs and ... also the scripts for running on B-Prolog, Gnu-Prolog, Eclipse, and Sicstus. ...
    (comp.lang.prolog)
  • Re: Fastcode Memory Manager B&V 0.09
    ... Take a look at the result of the Fragmentation Benchmark. ... very badly and still barely pass your validation4 code. ... implementations can result in different levels of fragmentation. ...
    (borland.public.delphi.language.basm)