Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym (23 Jan 2012 13:28 UTC)
Re: [Scheme-reports] fresh empty strings Andy Wingo (23 Jan 2012 15:23 UTC)
Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym (23 Jan 2012 15:34 UTC)
Re: [Scheme-reports] fresh empty strings Ray Dillinger (23 Jan 2012 20:17 UTC)
Re: [Scheme-reports] fresh empty strings Andy Wingo (23 Jan 2012 20:52 UTC)
Re: [Scheme-reports] fresh empty strings John Cowan (23 Jan 2012 23:05 UTC)
Re: [Scheme-reports] fresh empty strings Vincent Manis (24 Jan 2012 01:02 UTC)
Re: [Scheme-reports] fresh empty strings John Cowan (24 Jan 2012 02:06 UTC)
Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym (24 Jan 2012 09:37 UTC)
Re: [Scheme-reports] fresh empty strings John Cowan (24 Jan 2012 15:10 UTC)
Re: [Scheme-reports] fresh empty strings xacc.ide@gmail.com (24 Jan 2012 16:31 UTC)
Re: [Scheme-reports] fresh empty strings Per Bothner (24 Jan 2012 17:21 UTC)
Re: [Scheme-reports] fresh empty strings Andy Wingo (24 Jan 2012 17:00 UTC)
Re: [Scheme-reports] fresh empty strings Aubrey Jaffer (24 Jan 2012 02:16 UTC)

Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym 23 Jan 2012 13:27 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/23/2012 12:41 PM, John Cowan wrote:

>> Although an empty string denotes no locations, the string object still
>> must have a location in the store, at least in a semantic sense.  If it
>> didn't, it would not be possible to refer to it.
>
> Bignums occupy space in the store, but they are not *locations* in the
> technical sense of the report.
>

Indeed. As a practical example, an implementation might well have a
special immediate single-word value for the empty string (like many of
them do for #t, #f, and other specials like '() and the eof object), and
all the string operations special-cased to treat it as a zero-length string.

A very sophisticated (or over-engineered) implementation might well have
different string implementations for zero-length, up to 32 byte, up to
64KiB, and larger strings, each agressively tuned for the expected usage
profiles of strings of those lengths... Short strings might be
represented in a single SSE2 vector register or something, while huge
ones implemented as a tree of pages!

ABS

- --
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8dYCwACgkQRgz/WHNxCGqv9ACfSwIdEyaWUTeBTrwm8hISd7xT
REEAnjuqudsw8GKG4r9R/CCsj3C+OilP
=IUQh
-----END PGP SIGNATURE-----

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports