I used to compare Object Pascal (Delphi) with Borland C++5.0 with several source programs. All programs written in same algorithm. I found that for all cases, Object Pascal can run faster than BC++, moreover Object Pascal generates much smaller size of exe files. I question that why so many people say C++ is faster and smaller, is it correct?
Remark All programs are tested on Windows 2000's command prompt. Programs written with BC++, I abbreviated the codes as much as possible (idioms) and debug informations were removed.
May I ask the following questions.
1. which one is smaller and faster?
2. If I want smaller size of exe file translated from C++, how shall I do? (As I tested, exe file translated from C++ consumes at least 40 KB, to write application of 10 KB is not possible, but it's possible for Object Pascal and Assembly)