Board index » delphi » Turbo Pascal 7.0 vs Turbo C++ 3.1

Turbo Pascal 7.0 vs Turbo C++ 3.1

I have developed a rather large program (11000 lines) in Turbo Pascal
and it works fine. The programs does a lot of mathematical
calculations and it is slow. Does anybody know whether I can improve
the speed of execution if I rewrite the program in Turbo C++ 3.1
How in general C++ compilers compare with the Pascal counterparts ?
Many people say the C or C++ family by default are faster than Pascal
based languages. Is there a realistic statistic results carried out by

impartial parties to prove this ?.
Last question, I am in general a Pascal fun but I would like to port
my program to different platform. Should I start learning the ugly C
and C++ language ? or there is still hope for Pascal.
Delphi is a great package but unfortunately it is only targeted for
windows family and the way it goes (God forbid) it seems that Delphi
would have the same end as Turbo Pascal did !. Borland produced a
good product as Turbo Pascal and despite universal fame abandoned it.
I am getting this feeling that despite the success of Delphi the
market is following Microsoft way and go for C++. If Borland does not
wake up fast Delphi would be finished just like Turbo Pascal did.

 

Re:Turbo Pascal 7.0 vs Turbo C++ 3.1


Quote
>I have developed a rather large program (11000 lines) in Turbo Pascal
>and it works fine. The programs does a lot of mathematical
>calculations and it is slow. Does anybody know whether I can improve
>the speed of execution if I rewrite the program in Turbo C++ 3.1

Greetings,
               Turbo C++ V3.1 for DOS does not do any optimizations,
neither does Turbo Pascal (at least not 'real ones', if you really want to
optimize your code use Borland C++, it has a lot of optimizations.

There is also a pascal compiler called Stonybrook pascal , i do not know if it
is still sold, but it optimized VERY well, as good as Borland C++, or even
better... The price was steep though, 399$... just for the compiler.

Quote
>impartial parties to prove this ?.
>Last question, I am in general a Pascal fun but I would like to port
>my program to different platform. Should I start learning the ugly C
>and C++ language ? or there is still hope for Pascal.

You could try Java, strong type checking and everything and no pointers, I do
think it will become the language of the future.

Carl Eric Codere aka The Black One

Re:Turbo Pascal 7.0 vs Turbo C++ 3.1


In article <codc01.50.0007F...@gel.usherb.ca> cod...@gel.usherb.ca (Carl Eric Codere) writes:

Quote
>>I have developed a rather large program (11000 lines) in Turbo Pascal
>>and it works fine. The programs does a lot of mathematical
>>calculations and it is slow. Does anybody know whether I can improve
>>the speed of execution if I rewrite the program in Turbo C++ 3.1
>Greetings,
>               Turbo C++ V3.1 for DOS does not do any optimizations,
>neither does Turbo Pascal (at least not 'real ones', if you really want to
>optimize your code use Borland C++, it has a lot of optimizations.
>There is also a pascal compiler called Stonybrook pascal , i do not know if it
>is still sold, but it optimized VERY well, as good as Borland C++, or even
>better... The price was steep though, 399$... just for the compiler.

I think it's almost axiomatic that if your program runs slow you need to
optimize the algorithm.  Even the best optimizing compilers are very limited
as to what they can do, because they never "know" what you are trying to
accomplish; they cannot (wish they could!) rewrite your code for you.

You might find that you simply need to optimize the hardware -- faster CPU,
high bandwidth (i.e. recent-vintage) motherboard, lots of memory and so forth.
For example, if you see *any* disk activity during computational sections of
your program then you know you're seeing swapping and you need more memory.

Quote
>>Last question, I am in general a Pascal fun but I would like to port
>>my program to different platform. Should I start learning the ugly C
>>and C++ language ? or there is still hope for Pascal.
>You could try Java, strong type checking and everything and no pointers, I do
>think it will become the language of the future.

Hmmm... I tend to think it's simply today's media darling-child.  However, I
do suspect quite strongly that products like Delphi will soon appear on other
platforms.  Also bear in mind that Pascal compilers for many other platforms
do exist; for example, the Apple Macintosh has been described as "a Pascal
machine."

/mr/

Re:Turbo Pascal 7.0 vs Turbo C++ 3.1


Quote
Mehrzad Abdollahi (M.Abdoll...@bham.ac.uk) wrote:
> I have developed a rather large program (11000 lines) in Turbo Pascal
> and it works fine. The programs does a lot of mathematical
> calculations and it is slow. Does anybody know whether I can improve
> the speed of execution if I rewrite the program in Turbo C++ 3.1
> How in general C++ compilers compare with the Pascal counterparts ?
> Many people say the C or C++ family by default are faster than Pascal
> based languages. Is there a realistic statistic results carried out by

you can't run quake on a 386. that's just the way it is. either get a
faster processor or optimize the code yourself. Remeber only you can give
your programs speed.... maybe except for a pentium 200 ;)

Quote
> impartial parties to prove this ?.
> Last question, I am in general a Pascal fun but I would like to port
> my program to different platform. Should I start learning the ugly C
> and C++ language ? or there is still hope for Pascal.
> Delphi is a great package but unfortunately it is only targeted for
> windows family and the way it goes (God forbid) it seems that Delphi
> would have the same end as Turbo Pascal did !. Borland produced a
> good product as Turbo Pascal and despite universal fame abandoned it.
> I am getting this feeling that despite the success of Delphi the
> market is following Microsoft way and go for C++. If Borland does not
> wake up fast Delphi would be finished just like Turbo Pascal did.

I tried c++. the oop  is great but I find myself fixing pointer bugs all
the time. I've put programming in c off until a get a better compiler.
Turbo C++ 3.0 is just too old. I'm gunning for borland c or visual c for
win95.

Other Threads