🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #845

Re: Why is bagof so slow?

#845
From: Richard A. O'Keefe
Date: Sun, 27 May 1990 15:16
12 lines
1035 bytes
In article <2556@randvax.UUCP>, narain@randvax.UUCP (Sanjai Narain) writes:
> In the following program, there is one fact about f, namely f(1). 
> Running times of two queries ... are compared:
> 	f(X).			%   25 micro-seconds each
> 	bagof(X, f(X), S). 	% 1200 micro-seconds each
> Why a 40-fold difference in speed?

For the record, the ratio in NU Prolog 1.5#18 is 160.
(This was on an Encore Multimax running "4.3BSD", essentially unloaded.)
-- 
"A 7th class of programs, correct in every way, is believed to exist by a
few computer scientists.  However, no example could be found to include here."
Technical Details
Message-ID: <3082@goanna.cs.rmit.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!usc!samsung!munnari.oz.au!bruce!goanna!ok
References: <2556@randvax.UUCP> <3081@goanna.cs.rmit.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!usc!samsung!munnari.oz.au!bruce!goanna!ok
From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
Newsgroups: comp.lang.prolog
Subject: Re: Why is bagof so slow?
Keywords: bagof, setof
Message-ID: <3082@goanna.cs.rmit.oz.au>
Date: 27 May 90 15:16:43 GMT
References: <2556@randvax.UUCP> <3081@goanna.cs.rmit.oz.au>
Organization: Comp Sci, RMIT, Melbourne, Australia
Lines: 12