Re: Q: Optimising out C++ RTTI

Julian Dolby <dolby@cs.uiuc.edu>
2 Jan 1997 23:16:39 -0500

          From comp.compilers

Related articles
Q: Optimising out C++ RTTI jaidi@ubd.edu.bn (Nor Jaidi) (1996-12-27)
Re: Q: Optimising out C++ RTTI mrs@kithrup.com (1996-12-28)
Re: Q: Optimising out C++ RTTI dlmoore@ix.netcom.com (David L Moore) (1996-12-28)
Re: Q: Optimising out C++ RTTI dolby@cs.uiuc.edu (Julian Dolby) (1997-01-02)
| List of all articles for this month |
From: Julian Dolby <dolby@cs.uiuc.edu>
Newsgroups: comp.compilers
Date: 2 Jan 1997 23:16:39 -0500
Organization: Compilers Central
References: 96-12-179
Keywords: C++, performance
In-reply-to: Nor Jaidi's message of 27 Dec 1996 23:26:37 -0500

      Nor Jaidi <jaidi@ubd.edu.bn> asked the following:


> Being a curiousity-proof cat, I have been doing some thinking about
> C++ RTTI and came to the conclusion that it is something you have to
> pay even if you don't use it. May be I am wrong. Are there any
> compiler tricks that optimise out RTTI when not used?


Other posters have noted that RTTI is "free" in the sense that the
vtable, which is required to exist anyway for RTTI to work, is
sufficient. More generally, optimizing runtime type queries requires
the same analysis as virtual function optimization -- type inference
-- because it requires the same information: concrete types.


There has, of course, been much work in type inference. I am feeling
lazy, so I will merely provide a pointer to our work --
http://www-csag.cs.uiuc.edu/papers/ti-oopsla94.ps -- the bibliography
of which can point you to other stuff.


Cheers,
Julian Dolby
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.