From ok@atlas.otago.ac.nz  Tue May 16 01:01:49 2000
Received: from atlas.otago.ac.nz (atlas.otago.ac.nz [139.80.32.250])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id BAA04346;
	Tue, 16 May 2000 01:01:47 +0200 (MET DST)
Received: (from ok@localhost)
	by atlas.otago.ac.nz (8.9.3/8.9.3) id LAA15826;
	Tue, 16 May 2000 11:02:02 +1200 (NZST)
Date: Tue, 16 May 2000 11:02:02 +1200 (NZST)
From: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>
Message-Id: <200005152302.LAA15826@atlas.otago.ac.nz>
To: jan@swi.psy.uva.nl, paul@inet.co.za
Subject: Re: String Representation
Cc: p.singleton@keele.ac.uk, prolog@swi.psy.uva.nl

	I suppose enumerating the atom table occurs infrequently enough not to be 
	an issue.  What are the overheads associated with storing lists of 
	characters or lists of single character atoms?

I note that NU Prolog had a special representation for lists of
small integers, so that "abc" was indeed rather more compact than
[a,b,c].  The person who implemented that feature told me that in
his judgement, based on measurements afterwards, it was a waste of
time.

Note that Java/Javascript use 16-bit characters, and that strictly
speaking they _should_ use 31-bit characters.  In QP, lists of integers
took 2 cells (8 bytes) per character, and lists of atoms took the same.

Using a *single* atom to hold a string has the advantage that if there
are several occurrences of exactly the same string, they will share the
representation, so you can get less than 1 byte per character.

