Article View: comp.lang.prolog
Article #918Re: Proof that Prolog can be faster than C
From: Dan Sahlin
Date: Fri, 15 Jun 1990 16:25
Date: Fri, 15 Jun 1990 16:25
24 lines
1588 bytes
1588 bytes
David Hawley got the following result when trying tak(24,16,8,X) on SICStus: > SICstus Prolog(compiled) - mem ovflw after > 1 min of real time SICStus Prolog runs out of memory because a lot of choicepoints are created and a lot of trailing is done. If a cut is put into the first clause of "tak" no choicepoints will be created we will not run out of memory. Presumably Van Roy's compiler has detected that this cut may be safely inserted. Running tak(24,16,8,X) using SICStus Prolog on a SPARCstation 1 having compiled the program into emulated code then takes about 77 seconds. We also compiled the program to native code for SPARC (this version of SICStus has not yet been released) and it took about 25 seconds. As the SPARCstation has about half the number of MIPS as Van Roy's machine, we still have a factor of ten of execution performance improvements to get down to his figure of just 1.2 seconds. >So how did he do it? Inquiring minds (and inquisitive noses) want to know. Yes, please tell us how it was done! Dan Sahlin email: dan@sics.se
Technical Details
Message-ID:
<1990Jun15.162551.21443@sics.se>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!bloom-beacon!eru!luth!sunic!sics.se!danReferences:
<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!snorkelwacker!bloom-beacon!eru!luth!sunic!sics.se!dan From: dan@sics.se (Dan Sahlin) Newsgroups: comp.lang.prolog Subject: Re: Proof that Prolog can be faster than C Keywords: SICstus Aquarius performance Message-ID: <1990Jun15.162551.21443@sics.se> Date: 15 Jun 90 16:25:51 GMT References: <36986@ucbvax.BERKELEY.EDU> <1990Jun13.100341.7148@cs.umu.se> <7046@icot32.icot.or.jp> Sender: news@sics.se Organization: SICS, Swedish Inst. of Computer Science Lines: 24