This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Java: expand divide, expand conversions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]