On Fri, 2005-04-22 at 19:15 +0100, Ross Burton wrote: > On Fri, 2005-04-22 at 13:59 -0400, Jeffrey Stedfast wrote: > > seems to me like you are trying to micro-optimise and that's a huge > > waste of time. > > > > do you have any profiling data showing that these changes make a > > difference? > > For a few minutes of time, this reduces the memory impact of libcamel > (and I've partial patches for libebook too) by moving constant data > to .rodata, which is shared between all processes. Considering e-d-s is > being used by more and more applications, surely this is a good thing. isn't it already read-only? that's what static means in this context. to test this theory, I checked cvs libcamel-1.2.so and indeed, all the strings you are adding const to are in the .rodata section of the ELF file already. Section 12: Section name index: 113 Section name: .rodata Section type: 1 Section flags: 2 Section virtual addr at execution: 0x435a0 Section file offset: 275872 Section size in bytes: 26872 Link to another section: 0 Additional section information: 0 Section alignment: 32 Entry size if section holds table: 0 I used dd to dump the appropriate subsection of libcamel-1.2.so and sure enough, every string (and more) that you added const to is already in there :) -- Jeffrey Stedfast Evolution Hacker - Novell, Inc. fejj ximian com - www.novell.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature