This is the mail archive of the
mailing list for the GCC project.
Re: Aligned Strings
- To: pfk at fuchs dot offl dot uni-jena dot de, gcc at gcc dot gnu dot org, ak at suse dot de
- Subject: Re: Aligned Strings
- From: Jan Hubicka <jh at suse dot cz>
- Date: Sun, 26 Aug 2001 17:40:20 +0200
I've run across your testcase - it exhibits the worst case, where string
is 33 bytes long and aligned to 32bytes.
One way to track this down is to use the MAX_SKIP even for data alignment.
We can use the knowledge of size to fit string always in 2 cache lines
by aligning it to 32bit boundary when it is less than 2 bytes away.
I am not 100% sure this worths the extra machinery needed in target
macros, but it may make sense. The drawback is that programs often
uses just first few bytes of string, so alignment to cache line boundary
Other posibility is to increase the threshold from 32bits to 64bits.
I've run simple test with disabling this alignment and got less than 1%
change on gcc data section size.