This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: [PATCH] Java: expand divide, expand conversions
- To: Andrew Haley <aph@pasanda.cygnus.co.uk>
- Subject: Re: [PATCH] Java: expand divide, expand conversions
- From: Alexandre Oliva <oliva@dcc.unicamp.br>
- Date: 20 Jul 1999 14:59:55 -0300
- Cc: tromey@cygnus.com, java-discuss@sourceware.cygnus.com
- References: <19990719174857.5644.qmail@pasanda.cygnus.co.uk>
On Jul 19, 1999, Andrew Haley <aph@pasanda.cygnus.co.uk> wrote:
>> From: Tom Tromey <tromey@cygnus.com>
Andrew> I have not yet appplied this patch. Comments welcome.
>> Would it be hard to inline the test for divide-by-0?
> I could easily do that, but it would result in evil code bloat.
According to well-informed sources, it is probably worth the bloat,
except when optimizing for space. We have recently had a discussion
about removing some code bloat introduced by
pointer-to-member-functions handling in C++, by using thunks to avoid
a test about the kind of pointer-to-member. The outcome was the it
would be much worse in terms of speed; modern processors handle
conditional branches much more efficiently than function calls, even
if the call is to a thunk that will just adjust some register and call
a target function. Now think of the overhead of a complete function
call!
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them