[rescue] Mozilla Firefox
Joshua Boyd
jdboyd at jdboyd.net
Fri Apr 23 09:35:19 CDT 2004
On Fri, Apr 23, 2004 at 12:51:20PM +0000, Peter Corlett wrote:
> You should have picked on templates that aren't inlined. Now *that* is the
> major path to code bloat.
I actually like templates. I just wish they would allow a bit more
overloading. Like, say I write a templated class. I would then like to
be able to overload certain methods and say "Do it this way instead of
following the template if the data type in floats". Instead, I end up
writing it a template class, then rape and paste out any optimized
versions I may need. Grr.
> Do your C program never use pointers to functions and then call those?
> That's pretty much all that's involved in a virtual function call.
Though vtables do add to the complexity a bit. The time hit should be
bad, unless it messes up your caches at a bad time.
Where I work, pretty much everything is written in C. I wish we'd do
more in C++, but the hard realtime portions of the system should
definately stay as C code (with a few smidgens of assembly as needed to
use processor instructions not used by C).
More information about the rescue
mailing list