[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] fresh empty strings



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

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
>> something
>
> 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...

>
> Regards,
>
> Andy

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/

iEYEARECAAYFAk8dfa4ACgkQRgz/WHNxCGra6gCfXQN3IZIgg9yD7bSYaj8t6psW
YO0AmwVMIB4DeTwKM+3eO4do1mv7iGpX
=oMVN
-----END PGP SIGNATURE-----

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