Thomas Lord scripsit:

> You miss my point.   We have overwhelming empirical evidence
> that in some situations it is useful for string-ref to be O(1) and
> in other situations for it to be O(n).    If an implementation is
> to be Scheme, is its choice between those to be mandated by the
> report?

No, it is not to be mandated by the report, and it isn't.

BTW, it occurred to me that a representation-switching implementation
of strings can switch representations atomically provided the
pointer to the code units (8-bit, 16-bit, or 32-bit) contains
some tag bits indicating which one it is.  When a string mutator
detects that it needs to convert the representation, it builds up
a new representation in freshly allocated memory, constructs the
specially tagged pointer to it, and atomically swaps in the new
pointer for the old.  No locks.

-- 
Mark Twain on Cecil Rhodes:                    John Cowan
I admire him, I freely admit it,               http://www.ccil.org/~cowan
and when his time comes I shall                [EMAIL PROTECTED]
buy a piece of the rope for a keepsake.

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to