On 14 Nov 2005 22:04:03 -0800, "nilavya" <ni*****@gmail.com> wrote in
comp.lang.c++:
Hi,
I have an Application developed in eVC++. I have around 40 odd classes
for that appilcation. Some classes are single instance, they remain
throughout the execution. I am very eager to know, how are all
different types of variables actually stored in the memory. I also want
to know what happens when a function call is made. Does a class having
too many variables and too many functions affect the execution speed
specifically on PocketPC. If it affects how can I reduce that. Kindly
help.
The C++ language does not specify how variables are called in memory,
that is up to the implementation, usually influenced by the processor
hardware and the operating system.
What happens when a function call is made is that any arguments passed
to the function are copied into variables that the function can
access. Then execution is transferred to the function, with the
caller suspended until the function returns.
As for variables and functions, a program with none of either will
execute very, very fast, for it does nothing. As for how to
specifically make your programs run faster on a PocketPC, you would
need to ask in a group that supports programming in that environment.
It is quite possible that changes that would make a program faster on
one platform will make it slower on another.
But generally, a program needs at least as many functions and
variables as are necessary to perform its required operation.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html