Satisfying inheritence requirements

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Wed Oct 10 12:08:32 PDT 2007


Jason House wrote:
> Bill Baxter Wrote:
>> Did you compile with the -inline flag?
> 
> I had not... Only -O.  Are there any other good optimization options to use besides -O and -inline?  What does -release do?

'-release' disables asserts and array bounds checks, and removes pre- 
and post-condition blocks (in{}/out{}) on functions.

You could also try marking the function 'final' if it's never 
overridden. This allows the compiler to bypass the vtable (saving a few 
instructions per call) if calling through a class reference[1] and may 
make -inline more effective.


[1]: It won't work for interfaces, and struct member functions are 
implicitly final.


More information about the Digitalmars-d-learn mailing list