Re: [eigen] Performance gap between gcc and msvc ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Performance gap between gcc and msvc ?
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Fri, 18 Jun 2010 10:07:23 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=M4vQoWTLFzsAIdKsoXsc+hkyrZ0gSpavjU021scLi5w=; b=YS7jKg+yEy7EMZNZYyO5+y3yAJsC1ZHBHZ8z4MdGt8qqFAkZuHNkqXxgUKPcFz0h/U dQQVJmj6oZtK9rkT19zp7caMufBUsEkQM9FXd4tFYCs8BaojvIugdx0InkxeNMTexqfu 9DD3EZsk7UGlZE5dtdvt12SSoUQ2bg0NeA/go=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=UE36/7LUL7CVVLgcdJhJNyp9ysvIIQ2ulLl4MAyVTU2X1CrDBeO8GfGd5H8qJvGOtw Js3ZlPd148TpEBHavhtHGs+H75QnqnzDHXF3wOymdfOO7us1LGXDBDE2zFtqbaIPAszS /MDPdsWHzT01wAiseE09kMmBBcORJEDxa1rwQ=
On Fri, Jun 18, 2010 at 9:32 AM, <vincent.lejeune@xxxxxxxxxx> wrote:
> i've done some performance comparaison between windows and linux, using
> the blocked qr function.
> I was using a Core i5 with 3gb memory, and I ran the decomposition on
> 2048x2048 double random matrix on 2 operating system :
> - The first one is an opensuse 11.3 RC1 64 bits, shipped with gcc 4.5. I
> got the computation done in 10s in release mode (that is, with -O3)
> - The second one is Windows 7 64 bits, using Visual C++ 2010 express. It
> ships with the 32 bits version of the compiler, and I've heard that some
> feature like openMP are disabled. However, the computation was done in 6s
> with release mode...
> I've got something like a 40% performance drop for gcc in comparaison to
> VC++ 2010. I've heard that gcc generated code was marginally slower than
> MSVC one in some case, but 40% is not something negligible in my opinion.
Typically it is vice versa, i.e. normally GCC produces faster code. In
particular 32bit builds with MSVC are rather bad since the register
handling of MSVC's 32bit compiler is far from optimal. So you really
seem to be missing some important flag for GCC. Could it be that you
still have debug symbols enabled?
> On another note I ran qr decomposition for a 2048x2048 random matrix under
> scilab on windows, because scilab ships with a (binary only) mkl on
> windows. The computation is done in 2s.
> I think that the difference may be explained by MSVC disabling openMP on
> express version of the compiler, as Core i5 does have 4 logical core
> (2physical+2 Hyperthreaded I think), hence a performance improvement. I
> would like to know if Eigen does use openMP feature on matrix product,
> simultineously with vectorisation feature.
OpenMP is always (!) disabled per default on MSVC as is vectorization
(only under 32bit builds). For 64bit builds vectorization always takes
place. OpenMP can be enabled under "Properties -> C/C++ -> Language ->
Open MP Support". SSE is enabled via "Properties -> C/C++ -> Code
Generation -> Enable Enhanced Instruction Set". Regarding the
simultaneous usage, it is possible to use OpenMP and SSE.
Regards,
Hauke