switch index optimization

Jeffrey A Law law@cygnus.com
Tue Jan 27 09:36:00 GMT 1998


  In message < Pine.HPP.3.95a.980127162532.25774B-100000@hpatl20.cern.ch >you wri
te:
  > On Mon, 26 Jan 1998, Jeffrey A Law wrote:
  > > It's also not clear how useful that would be in practice; my hacked
  > > up version of cse.c only caught a small number of cases where it could
  > > improve real code instead of contrived example code.
  > 
  > I would think this kind of an optimisation would pay off for C++ code
  > where there are multitudes of small inlined methods.  The reason is that
  > the methods cannot always tell what state the object is in and hence
  > the body must be guarded with checks like this:
Good point.  I'll run it through some C++ code to see if it kicks out anything
useful.  I'm about ready to drop the work on the floor if I can't find some
compelling example code that shows it's worth the (significant) time to make
the code work correctly.
jeff



More information about the Gcc mailing list