[Patch, Fortran, OOP] PR 50960: vtables not marked as constant
Janus Weil
janus@gcc.gnu.org
Wed Nov 9 15:34:00 GMT 2011
>> It's nice to see that this kind of "devirtualization" optimization
>> actually works now. In this way the patch could really have an impact
>> on OOP code performance.
>>
>> Would be interesting to see if we get a measurable speed-up in
>> real-world code, like e.g. Salvatore's PSBLAS.
>
> Will test asap and be back to you; I know Tobias has a copy of my code,
> but it's probably a bit old, I'm going to publish an updated beta F03
> release in a few days.
Thanks a lot, Salvatore. However, I should maybe not set the
expectations too high: In complex real-world code it is often much
harder (and sometimes impossible) to apply the same optimizations as
in the simple example I posted. Also, the 'devirtualization' is in the
end just saving us one (proc-)pointer dereferencing (though it can
trigger secondary effects like inlining, etc).
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.)
Cheers,
Janus
More information about the Fortran
mailing list