[Numpy-discussion] The NumPy Mandelbrot code 16x slower than Fortran

Dag Sverre Seljebotn d.s.seljebotn at astro.uio.no
Mon Jan 23 04:04:36 EST 2012


On 01/23/2012 05:35 AM, Jonathan Rocher wrote:
> Hi all,
>
> I was reading this while learning about Pytables in more details and the
> origin of its efficiency. This sounds like a problem where out of core
> computation using pytables would shine since the dataset doesn't fit
> into CPU cache: http://www.pytables.org/moin/ComputingKernel. Of course
> C/Cythonizing the problem would be another good way...

Well, since the data certainly fits in RAM, one would use numexpr 
directly (which is what pytables also uses).

Dag Sverre

>
> HTH,
> Jonathan
>
> 2012/1/22 Ondřej Čertík <ondrej.certik at gmail.com
> <mailto:ondrej.certik at gmail.com>>
>
>     On Sun, Jan 22, 2012 at 3:13 AM, Sebastian Haase
>     <seb.haase at gmail.com <mailto:seb.haase at gmail.com>> wrote:
>      > How does the algorithm and timing compare to this one:
>      >
>      >
>     http://code.google.com/p/priithon/source/browse/Priithon/mandel.py?spec=svna6117f5e81ec00abcfb037f0f9da2937bb2ea47f&r=a6117f5e81ec00abcfb037f0f9da2937bb2ea47f
>     <http://code.google.com/p/priithon/source/browse/Priithon/mandel.py?spec=svna6117f5e81ec00abcfb037f0f9da2937bb2ea47f&r=a6117f5e81ec00abcfb037f0f9da2937bb2ea47f>
>      >
>      > The author of original version is  Dan Goodman
>      > # FAST FRACTALS WITH PYTHON AND NUMPY
>
>     Thanks Sebastian. This one is much faster ---- 2.7s on my laptop with
>     the same dimensions/iterations.
>
>     It uses a better datastructures -- it only keeps track of points that
>     still need to be iterated --- very clever.
>     If I have time, I'll try to provide an equivalent Fortran version too,
>     for comparison.
>
>     Ondrej
>     _______________________________________________
>     NumPy-Discussion mailing list
>     NumPy-Discussion at scipy.org <mailto:NumPy-Discussion at scipy.org>
>     http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
>
> --
> Jonathan Rocher, PhD
> Scientific software developer
> Enthought, Inc.
> jrocher at enthought.com <mailto:jrocher at enthought.com>
> 1-512-536-1057
> http://www.enthought.com <http://www.enthought.com/>
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list