Re: [eigen] Low performance in DEBUG mode

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I too have the problem of slow debug code, but the reason there is that
I have to use debug builds because stepping through code is hard on
RelWithDebInfo code. With Debug code, obviously eigen is extremely slow.

Is there any way to compile Eigen code with optimizations and the rest
with debug? This would be very helpful as I frequently have to wait 5-10
minutes for calculations until a breakpoint is hit when it takes about
10 seconds in release code.
I checked with gcc but didn't find a meaningful way (except by modifying
Eigen code itself...), but may be somebody has more experience? With
non-template libraries it's so easy to use release code, so why not
doing the same for template libraries is beyond me...

Cheers
Benjamin

On 10/25/2010 12:50 PM, Mathias Goldau wrote:
> Hi,
> 
> today I encountered a really strange thing: I compiled my unittest which need
> in Release mode just about 3 sec, in Debug mode. It uses just some matrix
> vector multiplication and the inverse computation. However in Debug mode it
> needs about 3:32 minutes!!
> A colleague of mine told me this could have to do with expression templates,
> and as I've seen in the "We need more Gaels"-thread that Eigen uses a lot of
> expression templates, I want to ask: Is this assumption true?, is there a way
> around to compile my unit tests also in debug mode, but with a bit more
> performance in the end?
> Even setting our cmake build type to: RelWithDebugInfo resulting effective in
> those CXX flags: "-g -DDEBUG -O2" shows no improvement. I assume this depends
> on the "-DDEBUG", am I right?
> 
> best regards
> Mathias
> 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/