From jan@swi.psy.uva.nl  Fri Jan  7 17:27:37 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.114.15])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id RAA16372;
	Fri, 7 Jan 2000 17:27:37 +0100 (MET)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3) id RAA25269;
	Fri, 7 Jan 2000 17:27:38 +0100
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: "Douglas Miles (Volt Computer)" <a-doug@microsoft.com>,
        "'liraola@opera.dia.fi.upm.es'" <liraola@opera.dia.fi.upm.es>
Subject: RE: Performance degradation revisited (SWI-Prolog 3.3.0 beta-9)
Date: Fri, 7 Jan 2000 17:14:20 +0100
X-Mailer: KMail [version 1.0.21]
Content-Type: text/plain
Cc: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
References: <E713F2760348D211A9B600805F6FA1AB0355990B@RED-MSG-09.itg-messaging.redmond.corp.microsoft.com>
MIME-Version: 1.0
Message-Id: <00010717273803.14903@gollem>
Content-Transfer-Encoding: 8bit

On Fri, 07 Jan 2000, Douglas Miles (Volt Computer) wrote:
>Ah, yes mine was with Wordnet 1.6 as well..
>
>First in 2.2.7/8
>And I had compared the consult times between atoms and lists_of_ascii
>in.. 
>s(100001740,1,'entity',n,1,1).
>s(100001740,2,'something',n,1,0).
>vs.
>s(100001740,1,"entity",n,1,1).
>s(100001740,2,"something",n,1,0).
>The result was the Atom version consulted much quicker then the char_lists
>
>So I adopted Atomic method
>
>now in 3.3.0
>I had continued using the Atom method..
>We should check if we need to go back to the char_list method.
>Since we are creating at least 174,008 Atoms <lol>
>We (Luis and I) probably both fell into the same boat.
>But hrrm what shall we do?
>Reason tells me char_list in that we are actually going to use it against
>ASCII input.
...
>I am going to convert those 5 files from Atoms to char_lists if Jan thinks
>its a good idea

Just fetch BETA-9.  This is a clear bug, as reported in the earlier
mail.  Atoms are the correct representation: they are compact, match
quickly and are cheap on the stacks.

Character-lists are there if you need to look into the atom (at the
quarks :-).  In older Prolog systems they were the way to avoid memory
leaks, but with more and more Prolog systems getting atom garbage
collection this idea is old-fashioned.

Small drawback is that atom garbage collection gets more expensive the
more atoms you have (not too much, it just walks along the array of
pointers to atom structures and checks whether the reference count is
zero/non-zero.  The marking phase is relative to the size of the
local and global stacks.).

Loading wn_s.pl (from Wordnet 1.5) does 12 atom garbage collections in
0.13 seconds (load time 10.85), So there is no real problem.

	Regards --- Jan

