-----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 [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
