Assignment Time for a 3d Variable [message #46481] |
Wed, 23 November 2005 04:15 |
Nuno Oliveira
Messages: 75 Registered: October 2003
|
Member |
|
|
I was making a routine that was doing an intense assignment in one of
the three directions possible, according to an option (either the first,
second or third dimension). I noticed that when I was doing it in the
first direction I took MUCH more time than in the other two directions.
Anyone has a clue for why does this happen? And anyone knows a way that
can make execution time similar? (Making the others to wait is not a
valid answer, ;) )
Here is the code for checking the execution times:
time = systime(1)
for k = 0, 99 do $
temp = vol[k,*,*]
print, 'execution time (for x axis): '+STRING(systime(1) - time)
time = systime(1)
for k = 0, 99 do $
temp = vol[*,k,*]
print, 'execution time (for y axis): '+STRING(systime(1) - time)
time = systime(1)
for k = 0, 99 do $
temp = vol[*,k,*]
print, 'execution time (for z axis): '+STRING(systime(1) - time)
And this is what I get:
execution time (for x axis): 0.24305296
execution time (for y axis): 0.0063638687
execution time (for z axis): 0.0065510273
|
|
|