[Numpy-discussion] arange(start, stop, step) and floating point (Ticket #8)

Charles R Harris charlesr.harris at gmail.com
Sat Feb 11 09:35:01 EST 2006

On 2/9/06, Travis Oliphant <oliphant.travis at ieee.org> wrote:
> Sasha wrote:
> >Well, my results are different.
> >
> > [snip]
> Yes, I think it's worth submitting.  Most of the suggestions for
> pointer-arithmetic for fast C-code were developed when processors spent
> more time computing than fetching memory.  Now it seem it's all about
> fetching memory intelligently.
> The buffer[i]=
> style is even recommended according to the AMD-optimization book Sasha
> pointed out.

Pointers vs indexing is architecture and compiler dependent. My own
experience is that recent gcc compilers produce better indexing code
than they used to and the indexing instructions on newer cpus are
faster. When I wrote the sorting routines pointers were faster, so I
used them for quicksort and mergesort. Now I think indexing is faster
and I am tempted to change the code. Indexing also looks cleaner to


More information about the NumPy-Discussion mailing list