Boost logo

Geometry :

Subject: [ggl] spatial index - structure
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-05-09 02:21:27


Barend Gehrels wrote:
> Hi Adam,
>
> On 7-5-2011 1:46, Adam Wulkiewicz wrote:
>> Adam Wulkiewicz wrote:
>>> In general,
>>> they takes the same amount of memory but Boost.Variant one is slightly
>>> faster.
>>
>> I forgot to mention that the test programs were compiled in VS2010.
>> Surprisingly, for g++ 4.5.2 the results are different - polymorphic
>> version is faster. So maby, should there be 2 structures to choose from?
>
> Yes, I had the same experience several times, the performance varies for
> different compilers and different use cases. Did you test it on the same
> machine? What was the fastest option (absolute, with both compilers)?

Inserting were faster in gcc 3.3s instead of 3.6s and searching in vs
1.7s instead of 2.0s.

> Anyway, I would hesitate to support both options. The choice is also
> dependant on other things, especially if the results vary and do not
> differ too much.
>
> Where is the code, still in the branch index_080_new ?

Yes, but there is only the code using Boost.Variant. I may add the
second version of nodes with some define switching between them later.

Regards,
Adam


Geometry list run by mateusz at loskot.net