Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!ucsd!nosc!helios.ee.lbl.gov!lll-tis!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!enea!kth!draken!ttds!jonasn
From: jonasn@ttds.UUCP (Jonas Nygren)
Newsgroups: comp.lang.prolog
Subject: Re: Grammar rule translator.
Message-ID: <1167@ttds.UUCP>
Date: 18 Aug 88 11:56:35 GMT
References: <196@quintus.UUCP> <4751@csli.STANFORD.EDU> <202@quintus.UUCP>
Reply-To: jonasn@ttds.UUCP (Jonas Nygren)
Organization: The Royal Inst. of Techn., Stockholm
Lines: 22

In article <202@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes:
>In article <4751@csli.STANFORD.EDU> evan@csli.UUCP (Evan Kirshenbaum) writes:
>When compiled with the current Quintus Prolog compiler,
>	p(..., S0, S) :- 'C'(S0, X, S1), ...
>and
>	p(..., [X|S1], S) :- ...
>run at the same speed.  I do not know whether this was the case in
>DEC-10 Prolog.  Anyrate, moving the terminals into the head should
>not be neceesary for efficiency.
>


I tried Kirshenbaum's translator with a lexical analyzer for C (sans preprocessor)
and compared with AAIS DCG translator which uses 'C'/3. The time for breaking
sieve.c into tokens where as follows:

	AAIS DCG		17.0 s
	Kirshenbaum's translator10.6 s

which amounts to a 38% speedup which seems worthwhile to me.

Jonas Nygren