home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.prolog
- Path: sparky!uunet!ukma!wupost!emory!athena.cs.uga.edu!aisun3.ai.uga.edu!mcovingt
- From: mcovingt@aisun3.ai.uga.edu (Michael Covington)
- Subject: Re: PC Prolog Compilers
- Message-ID: <1992Nov15.184348.24877@athena.cs.uga.edu>
- Sender: news@athena.cs.uga.edu
- Organization: AI Programs, University of Georgia, Athens
- References: <721489167.F00001@ocitor.fidonet>
- Date: Sun, 15 Nov 1992 18:43:48 GMT
- Lines: 38
-
- In article <721489167.F00001@ocitor.fidonet> Carl.Lemp@f2206.n124.z1.fidonet.org (Carl Lemp) writes:
- >I've been trying to evaluate Prolog compilers for the PC but I have
- >no real experience with any of them. Can anybody provide some
- >feedback on Prolog compilers they have used? Especially things like
- >execution speed for large programs and memory usage. Can any of the
- >prolog compilers produce programs that will compare in speed to
- >something in 'C'?
-
- It is not uncommon for even a mediocre Prolog implementation to run faster
- than the same program in Pascal or C. Provided, of course, that the program
- is something that really *needs* the crucial features of Prolog, namely
- unification and backtracking. Because Prolog is designed to do these things
- all the time, Prolog implementations have very efficient algorithms for doing
- them (including the associated memory management). These algorithms are
- likely to be faster than what you could quickly put together in Pascal or C.
-
- In particular, "malloc" or "new" in C or Pascal respectively can turn out to
- be a lot slower than the comparable memory management operations in Prolog,
- because Prolog is implemented with the expectation that dynamic memory
- management will be going on all the time, whereas C or Pascal implementors
- tend to view dynamic mem. allocation as something you do only occasionally
- and which therefore need not be terribly fast.
-
- >I have used an old version of Turbo Prolog, do its limitations ( No
- >univ, no functor, no asserting rules, typed variables ) rally get in
- >the way for applications like Natural Language Processing?
-
- Yes, because typically, in natural language processing, you'll want to
- accept some natural language input, translate it into a Prolog query, and
- then execute that query. The lack of a "call" procedure in Turbo makes
- this either clumsy or impossible depending on exactly how you set it up.
-
-
- --
- :- Michael A. Covington internet mcovingt@uga.cc.uga.edu
- :- Artificial Intelligence Programs phone 706 542-0358
- :- The University of Georgia fax 706 542-0349
- :- Athens, Georgia 30602-7415 U.S.A. amateur radio N4TMI
-