Bogus! (was Re: Proof that Prolog can be faster than C)

Saumya K. Debray debray at cs.arizona.edu
Thu Jun 14 00:49:33 AEST 1990


merlyn at iwarp.intel.com (Randal Schwartz) writes:
> In article <36986 at ucbvax.BERKELEY.EDU>, vanroy at pisces writes:
> | 
> | Benchmark timings:
> | 
> | Benchmark	Prolog  	C (no opt.)	C (opt. 4)
> | 
> | tak(24,16,8)    1.2		2.1		1.6
> 
> Bogus.
> 
> Comparing apples and oranges dude.
> 
> The prolog version most likely saves results from tak(a,b,c) so that
> they can do a quick lookup the next time around.

Look -- a program either does something, or it doesn't [*].  To say that
it "most likely" does something is basically the same as saying 
"I {didn't bother to | couldn't} understand the code, but here's a
wild guess", except that it's not quite as honest.

For the benchmark in question, Van Roy posted both the C and the Prolog
sources, so it's easy to verify whether or not there's any table lookups
going on.  There isn't.

[*] Unless, I suppose, we're talking about randomization or true
    nondeterminism.  In this case, we aren't.

-- 
Saumya Debray		CS Department, University of Arizona, Tucson

     internet:   debray at cs.arizona.edu
     uucp:       uunet!arizona!debray



More information about the Comp.lang.c mailing list