[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compare the executive speed with Matlab
From: |
Sergei Steshenko |
Subject: |
Re: compare the executive speed with Matlab |
Date: |
Fri, 2 Jan 2009 12:45:38 -0800 (PST) |
--- On Fri, 1/2/09, Jordi Gutiérrez Hermoso <address@hidden> wrote:
> From: Jordi Gutiérrez Hermoso <address@hidden>
> Subject: Re: compare the executive speed with Matlab
> To: address@hidden
> Cc: "John W. Eaton" <address@hidden>, address@hidden, "Howard"
> <address@hidden>
> Date: Friday, January 2, 2009, 12:21 PM
> 2009/1/2 Sergei Steshenko <address@hidden>:
> > My experiment was more severe.
>
> Show us the experiment, then.
>
> > In both cases I had prepared array (vector in
> 'octave') of 'sin' function
> > arguments, and I wasn't benchmarking the
> preparation part, I was
> > benchmarking just the 'sin' computation part.
>
> That's what I timed too.
>
> > Your experiment is not fair in its "C" part
> since it has int -> double
> > conversion while 'octave' part doesn't
> have it.
>
> Actually, I thought that Octave had this conversion too. At
> any rate,
> it doesn't affect the execution speed at all to use
> double i instead;
> I just tried it too.
>
> > I was also measuring time _inside_ the "C"
> program - to avoid whatever
> > startup time artifacts.
>
> I can't think of any artifacts that could have taken
> place here. There
> is no construction, memory management, whatever. Nothing of
> the sort.
>
> Just show us the fucking code. And I mean this in a good,
> non-confrontational way, and I hope you'll pardon my
> intensifier. :-)
>
> - Jordi G. H.
Sure, sure.
1) 'octave':
octave:36> angles = pi * (1:1000000) / 1000000;tic; sins = sin(angles); toc
Elapsed time is 0.49532795 seconds.
2) "C":
CPU time took 0.13 seconds at line number 74 of 'benchmark_sin.c' file
Wallclock time took 0.130743 seconds at line #74 of 'benchmark_sin.c' file
; the file is attached ('benchmark_sin.c'), it contains the command line
I used to compile it.
OK, so it's not 5 times, it's more than 3 times.
I think, however, that if I use table representation of 'sin', the ratio
will be the 5 times I vaguely remember.
Regards,
Sergei.
benchmark_sin.c
Description: Text Data
- compare the executive speed with Matlab, Howard, 2009/01/01
- Re: compare the executive speed with Matlab, Michael Goffioul, 2009/01/02
- 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, Jordi Gutiérrez Hermoso, 2009/01/02
- 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, Jordi Gutiérrez Hermoso, 2009/01/02
- Re: compare the executive speed with Matlab,
Sergei Steshenko <=
- 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, 2009/01/05