[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] fresh empty strings
-----BEGIN PGP SIGNED MESSAGE-----
On 01/23/2012 03:03 PM, Andy Wingo wrote:
> On Mon 23 Jan 2012 14:27, Alaric Snell-Pym <alaric@x> writes:
>> Short strings might be represented in a single SSE2 vector register or
> The point of this nit-pick is that this is impossible -- strings of one
> character *cannot* be immediates.
They might not be handled as immediates per se, there might be a 16-byte
bit of memory used for the value, and a pointer to that being the
canonical representation of the string, but that 16-byte bit of memory
might be aligned and formatted and whatnot correctly for it to be loaded
into an XMM register for string operations and the result written
back... and peephole optimisations to just pass the value about where
it's possible (no string mutations, entire data flow visible to the
compiler known, etc), discarding the reference to the string in memory.
Is that not possible?
But I digress - I've no idea if this would be a valuable optimisation at
all for anybody :-D
There's some argument for special representation for very short strings,
anyway, as lots of them might be used when READing and WRITEing symbols
and the like; rounding their size up to some machine register size and
canonically zeroing the unused space can make it quicker to compare them
on some architectures...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Scheme-reports mailing list