[Coco] a couple of programming questions
Robert Gault
robert.gault at worldnet.att.net
Thu Nov 19 22:39:56 EST 2009
Wayne Campbell wrote:
> 1. I am dealing with code that is only executed once in the program. It is initialization of variables, initial display, and initial data. Which of the following is better, in terms of overall execution speed of the program?
>
>snip
Any program using subroutines is slower than the same program not using
them. Of course, it will also be larger. You will need to decide whether
the larger size is more important than a slightly slower speed in the
smaller program or if the change in speed is even noticeable.
> 2. I am dealing with string literals of varying lengths. Some of them use the same word or words. Example:
>
This is really the same type of question. Which version uses the least
memory and how important is that? Which version is faster and is the
difference noticeable? Is the added complexity of concatenation of small
strings worth the effort verses any potential decrease in program size?
More information about the Coco
mailing list