> Date: Sat, 21 Oct 2000 15:30:25 -0700
> Subject: speeding up access to array slices
> From: "Catherine Moroney" <[log in to unmask]>
> I want to store a small array (patch) of data (usually 10x7) for each point
> in a larger array (typically 300x500) and be able to access any of these
> smaller patches quickly.
>
> I currently have something like below. When I do some profiling, the
> xpatch=opatch(i,j)%x statement always comes up as a hot spot.
When you say "hotspot", what exactly? How much?
There are ~70 elenmnts to be moved here, = 280 bytes, which is
a non-trivial amount.
The array elements opatch are not in contiguous storage, whereas
those of xpatch are, so a simple memory move cannot be done.
In other words, additional overheads are probably incurred.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|