on 5/07/00 14:19, HowY at [EMAIL PROTECTED] wrote:
>> I know that
>> 1. C++ app takes more memory
>> 2 .C++ app is slow on palm
>
>
> Hmmm.. Enough said?
1. false (mostly).
2. false.
To develop: there are some things in C++ which take more memory, like
vtables when using virtual methods. But then, take the difference between a
good C++ design and a good C design, look at the ways you solve the problem
and you may well end up with eating the same amount of memory. Also, if you
don't have zillion of classes, the space used by vtables is close to
neglectable.
For statement two, this is totally wrong. Bad code can be slow. Bad
algorithms can be slow. Good code, good algorithms can be very fast, either
in C or C++. I have a rather big code base (for the Palm environment, that
is) entirely written in C++ (around 60 classes), not only does it fit on the
Palm but it's also quite fast. It's because we tuned the _algorithms_ to be
fast, no matter they run in C or C++. That's all the difference. The trick
to speed is to know your compiler and processor very well and do some
profiling to find the bottlenecks. Metrowerks Profiler is very helpful on
that.
--
Florent Pillet, Software Architect
OPTeWAY S.A., 2881 route des cr�tes, BP. 308
06901 Sophia Antipolis cedex, FRANCE
Ph: +33 4 93 95 66 51, Fx: +33 4 93 95 66 52, http://www.opteway.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/