*From*: Pierrick Brunet <pierrick.brunet@xxxxxxxx>*To*: pythran@xxxxxxxxxxxxx*Date*: Sun, 13 Apr 2014 10:35:13 +0200

On 13/04/2014 09:07, serge Guelton wrote:

On Sat, Apr 12, 2014 at 05:42:04PM -0700, Mehdi Amini wrote:Hi Ian, I checked the evolve.py test case and I didn't find any magic :) I would even say that we should be able to do *a lot* better in such cases (lazy evaluation + fusion)... Numpy is (only) two times slower but their implementation is in Python and the algorithm is different. Here is the numpy implementation: https://github.com/numpy/numpy/blob/master/numpy/core/numeric.py#L1314 Here is ours: https://github.com/numpy/numpy/blob/master/numpy/core/numeric.py#L1314 (yes our C++ is absolutely awful because of the lack of comments...)At the C++ level, we also optimize the laplacian expression and the evolve expression to avoid allocating temporary arrays (well, we still perform one allocation per np.roll call, and one per laplacain call), using expression templates, but other compilers should do it, there is nothing new inside.

**Follow-Ups**:

**References**:**[pythran] Trying to understand why Pythran does so well on the diffusion example***From:*Ian Ozsvald

**[pythran] Re: Trying to understand why Pythran does so well on the diffusion example***From:*Mehdi Amini

**[pythran] Re: Trying to understand why Pythran does so well on the diffusion example***From:*serge Guelton

- » [pythran] Trying to understand why Pythran does so well on the diffusion example- Ian Ozsvald
- » [pythran] Re: Trying to understand why Pythran does so well on the diffusion example- Mehdi Amini
- » [pythran] Re: Trying to understand why Pythran does so well on the diffusion example- serge Guelton
- » [pythran] Re: Trying to understand why Pythran does so well on the diffusion example - Pierrick Brunet
- » [pythran] Re: Trying to understand why Pythran does so well on the diffusion example- Ian Ozsvald