🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #921

Re: Proof that Prolog can be faster than C

#921
From: Matthew Huntbach
Date: Fri, 15 Jun 1990 17:56
20 lines
1291 bytes
What is the point of using Prolog if you don't backtrack?
All you have is some syntactic sugar for a subset of functional
languages (i.e. instead of fun f(pat1) = f(g(h(p))) | f(pat2) = [];
you have f(pat1,q) :- h(p,p1),g(p1,p2),f(p2,q).
         f(pat2,[])

instead of fun f(x) = if a(x) then b(x) else c(x)
you have f(x,y) :- a(x),!,b(x,y).
         f(x,y) :- c(x,y). ).

The comparisons that are being made seem to be for
non-backtracking problems.

If backtracking is important, then comparisons should be made
with examples where Prolog backtracks. If it isn't, all we are
saying is that Prolog has a nicer sugar coating than its
rivals, but this sugar coating doesn't (as you might suppose)
hide any nasty-tasting inefficiency.

Matthew Huntbach
Technical Details
Message-ID: <2393@sequent.cs.qmw.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!icdoc!qmw-cs!mmh
References: <36986@ucbvax.BERKELEY.EDU> <1990Jun13.100341.7148@cs.umu.se> <7046@icot32.icot.or.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!icdoc!qmw-cs!mmh
From: mmh@cs.qmw.ac.uk (Matthew Huntbach)
Newsgroups: comp.lang.prolog
Subject: Re: Proof that Prolog can be faster than C
Keywords: SICstus Aquarius performance
Message-ID: <2393@sequent.cs.qmw.ac.uk>
Date: 15 Jun 90 17:56:52 GMT
References: <36986@ucbvax.BERKELEY.EDU> <1990Jun13.100341.7148@cs.umu.se> <7046@icot32.icot.or.jp>
Reply-To: mmh@cs.qmw.ac.uk (Matthew Huntbach)
Organization: Computer Science Dept, QMW, University of London, UK.
Lines: 20