Boost logo

Geometry :

Subject: Re: [geometry] [index] Rtree insert performance super slow on example
From: Mark McCann (mmccann_at_[hidden])
Date: 2015-02-12 16:55:58


Hi Adam,

Problem solved!

I am using clang: Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM
3.5svn)
Target: x86_64-apple-darwin14.1.0

Ok, so I had no idea how important passing in an optimization flag was in
some cases. I just tried again with g++ -O2 as you suggest and I'm seeing a
35x speedup! Crazy. Thank you so much! You might want to mention this is
the documentation on Boost. Here's the new results:

0.318146 seconds - pack 1000000
0.071993 seconds - query(B) 100000 found 100046
0.875472 seconds - insert 1000000
0.817668 seconds - query(B) 100000 found 100046

Adam Wulkiewicz wrote
>> However, i’m seeing performance that is ~20x slower when compiling and
>> running the same code:
>> ~/geometry/index/example] ./benchmark_experimental
>> 2.73026 seconds - pack 1000000
>> 1.32293 seconds - query(B) 100000 found 100046
>> 34.0913 seconds - insert 1000000
>> 10.7422 seconds - query(B) 100000 found 100046
>>
>> My machine is older, but is this old enough to result in this massively
>> slow performance?
>> I’m compiling on OS X 10.10 with a 2 x 2.93 GHz Quad-Core Intel Xeon and
>> 32 GB of DDR3 memory. The machine is circa 2009, but it was absolutely
>> the fastest available at the time.
>>
>> Any help would be appreciated or pointers to old discussions that would
>> help.
>
> I'm assuming you're testing Boost 1.57.
> What compiler are you using (probably clang) and what parameters are
> passed into it?
> Is optimization enabled?
> Indeed in the documentation it's not mentioned that the optimization
> level /O2 was enabled while gathering those results.
>
> Regards,
> Adam

--
View this message in context: http://boost-geometry.203548.n3.nabble.com/index-Rtree-insert-performance-super-slow-on-example-tp4026431p4026433.html
Sent from the Boost Geometry mailing list archive at Nabble.com.

Geometry list run by mateusz at loskot.net