At 05:50 PM 8/20/2002 +0600, you wrote: >hello everyone, > >One of my programs is getting bigger and bigger in code size. >So i have no option but to create more and more segments. >Dose the number of segments in the application has any effect in program >performance ?
Extra segments affect program speed in two ways: 1) extra time spent at program startup to load and relocate each segment. This shouldn't be too noticeable. 2) time spent in intersegment jumps. Calling another segment adds an extra jump instruction from a normal jump, so it can add a few cycles to calling a routine. The time penalty is similar to calling a virtual function in C++. It shouldn't be noticeable either, but its best if you segment your app so that functions that tend to call each other are in the same segment. Usually, this will happen normally due to sane partitioning of functionality into source files. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
