🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2828

argument 2 and 3 of append/3

#2828
From: Bart Demoen
Date: Thu, 15 Oct 1987 16:00
27 lines
1734 bytes
Reply to the News of Lars-Henrik Eriksson of 5 Oct 87 10:41:33 GMT

We read with delight on News the - for us - old news that switching the
position of the second and third argument of append/3 results in such a
dramatic speed loss for a well known "high-powered commercial Prolog system"
(you have 2 guesses and it is not BIMprolog ...)
We at BIM learned this by looking at the code 'generated' for the WAM
instructions in this implementation ... we could not believe our eyes, and we
estimated (we could not execute it !) the effect of this quirk around 15% and it
turns out to be 35%, wonderful ! What people do to reach 20Klips for nrev on
a SUN2 (it is 2.5 years ago already) ... one would at least expect them to
generalise this trick in later releases, but not even that !

Test yourself with the following multiple choice:

   the speed loss is due to:

	1. shortage of hardware registers
	2. special treatment of the sequence
			UNIFY_XVAL  4
			UNIFY_XVAR  3

We give you one more hint: this implementation uses just enough hardware
registers to store all temporary registers of the second definition of append/3

Bart Demoen  bimbart@kulcs  bart@sunbim
Andre Marien andre@sunbim   bimandre@kulcs
Technical Details
Message-ID: <995@kulcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!prlb2!kulcs!bimbart

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!prlb2!kulcs!bimbart
From: bimbart@kulcs.UUCP (Bart Demoen)
Newsgroups: comp.lang.prolog
Subject: argument 2 and 3 of append/3
Message-ID: <995@kulcs.UUCP>
Date: Thu, 15-Oct-87 12:00:10 EDT
Article-I.D.: kulcs.995
Posted: Thu Oct 15 12:00:10 1987
Date-Received: Sat, 17-Oct-87 21:29:25 EDT
Reply-To: bimbart@kulcs.UUCP ()
Organization: Katholieke Universiteit Leuven, Dept. Computer Science
Lines: 27