This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Interface dispatch table optimization
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mckinlay at redhat dot com (Bryce McKinlay)
- Cc: java-patches at gcc dot gnu dot org
- Date: Thu, 9 Feb 2006 10:58:29 -0500 (EST)
- Subject: Re: Patch: Interface dispatch table optimization
> It turns out that we can allocate interface dispatch (jclass->idt)
> tables as a single struct, rather than a struct that contains a pointer
> to another table. This means that only one idt allocation is required
> for each class/interface, and _Jv_AllocBytes can be used to reduce the
> memory that needs to be scanned by the GC.
>
> In addition, this means that two less pointer dereferences are required
> for every interface call!
>
> I'm going to test this a bit more, then check it in to trunk.
>
> Bryce
>
> -static _Jv_IDispatchTable null_idt = { {SHRT_MAX, 0, NULL} };
> +static _Jv_IDispatchTable null_idt = { {SHRT_MAX, 0, {}} };
I cannot remember if {} is valid C++, I think it is but I am not sure.
I know it is invalid C.
-- Pinski