home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / prolog / 2078 next >
Encoding:
Text File  |  1992-11-15  |  2.5 KB  |  50 lines

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