[geos-devel] Benchmark between various geometry libraries
strk at keybit.net
Wed Dec 9 11:24:10 EST 2009
On Wed, Dec 09, 2009 at 05:13:15PM +0100, Maxime van Noppen wrote:
> Maxime van Noppen wrote:
> > I will post any numbers I get.
> I'm still far from having a solid and complete report but just to give
> you a taste : on 100 intersections dynamic allocations represent 25.01%
> of the time cost (17.14% spent allocating, 7.87% deallocating).
> I've also found several small optimizations that can lead to significant
> performance boosts. For example, on the 100 intersection benchmark I
> found that 10% of the time was spent in CoordinateArraySequence::getAt.
> The fact is that as the code is in the .cpp file it cannot be inlined by
> the compiler. So I juste moved the one-line code of the .cpp file to the
> .h file and the runtime cost dropped drastically (to ~ 2%).
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 ?
Free GIS & Flash consultant/developer () ASCII Ribbon Campaign
http://foo.keybit.net/~strk/services.html /\ Keep it simple!
More information about the geos-devel