Re: Astronomys` Sixth Neighbour Needs Help [message #35962 is a reply to message #35884] |
Fri, 25 July 2003 19:14   |
touser2001
Messages: 8 Registered: July 2003
|
Junior Member |
|
|
I can begin to imagine how people must have felt when electricity
became widely available... or when the wheel was invented even!!!
I was already content with the first change by Rob, before that I had
actually thought there was some limit and I wouldn`t be capable of
reading a 3800 star file in less than a day... but 40 seconds??!!
Inappropriate, but the words that come to mind are: Shock and Awe!
I have to confess that being a begginner IDLer there is much of the
improvements that I do not understand.
In particular what is the meaning of # in the dx = u#x (so why does
Rob use dx = u#x - x#u and Pavel only dx = u#x?
Also, in the sort, I don`t understand how it works yet but, there is
no mention of it being an increasing distance sort yet it is.
Also, Pavel, you pointed out that in large arrays memory allocation is
slower than loops. Where in Robs code was "memory allocation"
substituting loops?
I have to admit that the science that I can do now is greatly enhanced
but I am most intrigued by the inefficiency of my program... the
number of calculations is the same so how come the huge speed
increase?
This is, undoubtedly, my key question now since it influences all my
future programs!
When I write another program what set of rules should I follow to make
it most efficient?
What is the hierarchy of processes (loops better than ...) (do while
better than ...).
First Commandment: thou shalt not say you made some elses` program
Second Commandment: thou shalt always use loops to minimize memory
allocation
etc
I cannot exagerate how much I appreciate all the help!!!!
Bruno
Astronomy PhD Student
University of Florida
|
|
|