Proof that Prolog can be faster than C

David John Hawley hawley at icot32.icot.or.jp
Thu Jun 14 13:09:33 AEST 1990


In article <1990Jun13.100341.7148 at cs.umu.se> christer at cs.umu.se (Christer Ericson) writes:
>This is silly! Haven't you learned yet that no language is faster/slower than
>another language - it's the implementation that's faster/slower than that

Well, of course the point is that Prolog is a much higher-level
language than C type languages, but we don't want to pay for all that
expressiveness all the time. I.e. the speed of our programs should
relate to the algorithms, not to the languages in which they are
expressed. So Prolog needs GREAT compilers and implementations, and
THEN we can write SHORT, SIMPLE, and FAST programs.

Well, I tried the given benchmark on my SUN/?:
	C version       	  - 8.7u
	SICstus Prolog(compiled)  - mem ovflw after > 1 min of real time

So how did he do it? Inquiring minds (and inquisitive noses) want to know.

---------------------------
David Hawley, ICOT, 4th Lab
csnet: hawley%icot.jp at relay.cs.net uucp:{enea,inria,mit-eddie,ukc}!icot!hawley
ICOT, 1-4-28 Mita, Minato-ku, Tokyo 108 JAPAN. TEL/FAX {81-3-456-}2514/1618



More information about the Comp.lang.c mailing list