[geos-devel] Benchmark between various geometry libraries

Maxime van Noppen maxime at altribe.org
Wed Dec 9 11:23:09 EST 2009


strk wrote:
> CoordinateArraySequence::getAt is a virtual function, which is probably
> the reason why the fully templated solution is much faster instead.
> 
> How can a virtual method be inlined by the compiler ? 

Obviously it can't. I just missed the fact it was virtual because it's
not declared as such in CoordinateArraySequence. So I believe the
compiler was only able to inline it when it was used explicitly through
the exact type. This explains why the cost remains visible (indeed if it
was totally inlined I didn't expect to see it in the call graph anymore).

-- 
Maxime


More information about the geos-devel mailing list