From: Bryce McKinlay <mckinlay@redhat.com>
To: Andrew Pinski <pinskia@physics.uc.edu>
Cc: java-patches@gcc.gnu.org
Subject: Re: Patch: Interface dispatch table optimization
Date: Thu, 09 Feb 2006 15:59:00 -0000 [thread overview]
Message-ID: <43EB66F9.1010701@redhat.com> (raw)
In-Reply-To: <200602091558.k19FwT3j029875@earth.phy.uc.edu>
Andrew Pinski wrote:
>> 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.
>
Is there an alternative? It seems to accept it without any complaints.
Bryce
next prev parent reply other threads:[~2006-02-09 15:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-09 15:56 Bryce McKinlay
2006-02-09 15:58 ` Andrew Pinski
2006-02-09 15:59 ` Bryce McKinlay [this message]
2006-02-09 16:40 ` Andrew Pinski
2006-02-09 16:49 ` Gabriel Dos Reis
2006-02-09 16:51 ` Per Bothner
2006-02-09 18:01 ` Tom Tromey
2006-02-10 0:05 ` Bryce McKinlay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43EB66F9.1010701@redhat.com \
--to=mckinlay@redhat.com \
--cc=java-patches@gcc.gnu.org \
--cc=pinskia@physics.uc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).