put jump tables in .const not .text on Darwin
Paul Koning
pkoning@equallogic.com
Fri Oct 15 14:36:00 GMT 2004
>>>>> "Dale" == Dale Johannesen <dalej@apple.com> writes:
Dale> On Oct 14, 2004, at 6:35 PM, Geoffrey Keating wrote:
>> On 14/10/2004, at 6:31 PM, Andrew Pinski wrote:
>>> On Oct 14, 2004, at 9:28 PM, Geoffrey Keating wrote:
>>>> This is a small optimisation improvement on Darwin; it's better
>>>> to separate jump tables from instructions because it makes
>>>> better use of separate instruction and data caches.
>>> Are you sure that this helps at all, the last time I heard Dale
>>> tried this and it did not help at all.
Dale> Right, it seemed to make no difference either way (although I
Dale> think the measurement was pre-G5). What's the data backing up
Dale> your claim?
Different platform, admittedly -- but I've done embedded systems work
on MIPS where you could get a substantial gain (20% or better) by
arranging the fastpath code chunks to be adjacent in .text, so they
wouldn't conflict in the cache address space (if the total was small
enough).
To make this work well, you have to keep data in its own section.
paul
More information about the Gcc-patches
mailing list