[Patch, Fortran, OOP] PR 50960: vtables not marked as constant

Janus Weil janus@gcc.gnu.org
Sun Nov 13 22:25:00 GMT 2011


>> Still, I'm curious to see whether it will have any effect. (Of course,
>> seeing a difference in performance between 4.6 and current trunk does
>> not necessarily mean that this is due to the constant vtables.)
>>
> Indeed, if anything, the 4.7 code is slightly slower than 4.6.2 (tried
> on two different AMD and an Intel Core2), about 1-2 %.

Huh, too bad. Thanks for checking, anyway :)


> Of course, having used a rather complex example, there's no way to
> isolate the vtable contribution, nor do I have any idea of what other
> changes might have an effect.

I guess that the overall performance is probably dominated by the
general middle-end changes between 4.6 and 4.7 (without being able to
tell you any details about these). A better way of checking the vtable
contribution would be to compare two 4.7 builds (before and after
r181199), but I'm not asking you to do this, since it's probably not
worth the hassle.


> As Janus pointed out, I do not currently
> have any non-overridable routines in psblas/mld2p4.

To be clear: For NON-OVERRIDABLE, there was a separate fix which makes
all of those calls 'static'. The const-vtab patch of PR50960 should be
able to optimize even overridable procedures in some cases (i.e.
replace them by a static call, as the test case shows).


> In the Trilinos F2003 package there are a few ones, but I cannot test
> because it needs FINAL.

Let's hope we'll get this for 4.8 ;)

Cheers,
Janus



More information about the Fortran mailing list