[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compare the executive speed with Matlab
From: |
wim van hoydonck |
Subject: |
Re: compare the executive speed with Matlab |
Date: |
Mon, 5 Jan 2009 09:50:15 +0100 |
On 1/3/09, Sergei Steshenko <address@hidden> wrote:
>
>
>
> --- On Fri, 1/2/09, wim van hoydonck <address@hidden> wrote:
>
> > From: wim van hoydonck <address@hidden>
>
> > Subject: Re: compare the executive speed with Matlab
> > To: address@hidden
>
> > Cc: "John W. Eaton" <address@hidden>, address@hidden, "Howard"
> > <address@hidden>
>
> [snip]
>
>
> > angles = real( [(i, i=0,n-1)]/n , kind=dp )
>
>
> [snip]
>
> 'pi' appears to be missing in the line above, but I'm unfamiliar with
> f90 syntax, so I do not know how fix the line, probably
>
> angles = real( pi * [(i, i=0,n-1)]/n , kind=dp )
>
> Regards,
>
> Sergei.
>
>
>
>
Hi Sergei,
You are right, 'pi' was in the wrong place.
About the timing differences:
It might be that, due to optimizations, ifort already calculates the
result (the sinus of the angles) at compile time (as that is something
that can be calculated in advance), but I am not sure about that.
Anyway, the speed difference here is not that big, it becomes more
apparent with larger programs that contain multiple for/do loops.
I've seen a speed increase of 1000 between matlab and fortran on a
program that contained a double loop, from 25 minutes of calculation
time to 1.5 seconds...
But there are obviously also nontrivial problems where fortran
(gfortran, ifort,...) is not faster and even slower (see here:
http://shootout.alioth.debian.org/gp4/).
Greetings,
wim
- Re: compare the executive speed with Matlab, (continued)
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab, John W. Eaton, 2009/01/02
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab, wim van hoydonck, 2009/01/02
- Re: compare the executive speed with Matlab, John W. Eaton, 2009/01/02
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab, Sergei Steshenko, 2009/01/02
- Re: compare the executive speed with Matlab,
wim van hoydonck <=
- Re: compare the executive speed with Matlab, John W. Eaton, 2009/01/02
Re: compare the executive speed with Matlab, Howard, 2009/01/03