comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Assignment Time for a 3d Variable
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Assignment Time for a 3d Variable [message #46473 is a reply to message #46470] Wed, 23 November 2005 08:52 Go to previous messageGo to previous message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
David Fanning wrote:
> The speed differences have to do with how you access different
> parts of the array in memory. If the parts you want are contiguous,
> then you can get them faster than you can if they are far apart in
> memory. (Think how much faster it is to pick up the poker
> chips when they are stacked than when they are scattered all
> around the table.)
>
> To make these kinds of assignments as fast as possible, use
> the TRANSPOSE function to organize the data into the fastest
> possible position:
>
> IDL> Help, data
> DATA BYTE = Array[3, 227, 149]
> IDL> data = Transpose( Temporary(data), [2,3,1] )
> IDL> Help, data
> DATA BYTE = Array[227, 149, 3]

How does one know which is the fastest possible position? Should the
largest dimension be first? Nuno's example seems to imply that the
first dimension is not the fastest accessed.

-Dave
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating Panels in iTools
Next Topic: How should I mark annotations in multi plot window

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 09:18:55 PDT 2025

Total time taken to generate the page: 0.79931 seconds