[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: oct file: slower than expected using fortran_vec
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: oct file: slower than expected using fortran_vec |
Date: |
Mon, 16 May 2011 08:03:39 -0500 |
On 15 May 2011 15:10, Seb Astien <address@hidden> wrote:
> Hi,
>
> I have been experimenting a bit with oct files to see how much faster
> it would be.
> I wrote a trivial example to sum the elements of an array.
> To my surprised, this was still much slower than built-in functions:
Of course, your C++ code isn't vectorised. Delegate the sum to the
BLAS instead which will use vector instructions. Sometimes gcc can
vectorise, depending on compiler flags (which ones did you use?), but
not always.
HTH,
- Jordi G. H.
Re: oct file: slower than expected using fortran_vec,
Jordi Gutiérrez Hermoso <=