Re: absolute function
- Posted by Vinoba Mar 18, 2011
- 3844 views
Thank you for the replies and conclusions.
1. It is generally thought that a loop is costly in time, compared to a straight one line solution. On the other hand compiled executable have narrowed down the time for looping.
2. There have been some very interesting (and at least 2 better than mine) in the past. I was not aware of the past threads.
3. I do intend to test the functions in a more (i) business like and (ii) scientific level program with the following variables in mind.
A. The occurrence of the function in a typical program as an atom;
B. The occurrence of the function in a typical program as a sequence and as a long sequence;
C. Interpreted v. compiled executable. The latter are more relevant to me.
4. I could quote a thousand APL v. Basic (straight line solutions v. looping and branching) and by and large the APL solutions were better in terms of speed, space used, etc. However, this is a Euphoria forum and I don't want to bring in those very old arguments, and other languages.
5. No low level function is trivial enough to be ignored for speed; even a 1% speed improvement in a low level functions relevant and was modified in the past by the space used - even space required improve performance is not relevant any more. The very fact that it is incorporated in the core distribution of a language, is sufficient evidence that it is an important relevant function or code.
6. Resistance to change has been the downfall of many civilizations.