PDA

View Full Version : Delphi slow?



DarkSSJ
10-11-2002, 09:15 PM
Many, many, many people says that Delphi and C++ are like a bike and a Ferrari.
I hate this people and I think that Delphi is enought fast to break their stupid applications 8) but I never do a benchmark so I'm not sure of Delphi speed.
Do you have any idea?

P.S.: sorry for my bad english :roll:

BlueCat
10-11-2002, 09:19 PM
I think it's the C++ fans' job to convince us that Delphi's slow, don't waste your time :roll:

DarkSSJ
10-11-2002, 09:52 PM
Did anyone do a benchmark?

TheLion
10-11-2002, 10:14 PM
No I didn't do a benchmark, but I think those C++ people are living in the past... Delphi is up to the competition and is just as fast as C++, however if you are going to compare Delphi with C++ keep in mind that C++ uses no VCL components for the form, so thats what you'll have to do in Delphi too, if you are going to compare them!

However I'm confident Delphi is just as fast as C++!

Xorcist
10-11-2002, 10:20 PM
Well this is interesting... Computer Language Shootout (http://dada.perl.it/shootout/craps.html) - Delphi (http://dada.perl.it/shootout/delphi.html)

P.S. This guy (http://www.optimalcode.com/tscp.htm) makes a case (although breif) about literal translations from C/C++ to Object Pascal, and how a rewritten version specifcally for Object Pascal increased the speed of the program.

Delphic
11-11-2002, 02:14 PM
blub

Michalson
11-11-2002, 02:49 PM
There is a site here (http://home.xnet.com/~johnjac/JCEC.htm) (don't know if it's still active, haven't visited in a while) that holds a competion to write an optimized program. The programs are divided between VC and Delphi and between those using only VC/Delphi and those that include inline assembly

Zanthos
11-11-2002, 02:54 PM
If perchance a C++ application runs faster than its identical Delphi equivalent in a benchmark, you can be guaranteed which one took longer to get working :wink:

lnpneil
11-11-2002, 02:56 PM
I'm of the opinion that if something is fast enough for your needs - does it really matter if something else does it faster?

I guess I've never gotten around to programming something that needs every possible fraction of a second of speed you can optimize it for but on the other hand I have programmed a lot of things in C++... and coming over to Delphi may or may not improve runtime speed but it certainly cuts development time!

Neil

Alimonster
12-11-2002, 02:12 PM
This is exactly the kind of thing that I never, ever, ever get bothered about :).

Delphi is approximately as fast as C++. Sometimes a bit slower. Sometimes a bit quicker. Part of the problem in comparing the two is simply that they require different ways of thinking. If you write a Delphi program as you could a C++ program then you're not taking advantage of some of the finer points of Object Pascal and should change your style.

The point is that the difference is not something to lose sleep over. If Delphi is slower, it is not by a great deal. Sometimes code can be more concisely expressed in Object Pascal, sometimes C++. But don't listen to any FUD that flat-out disses a language without any thought. Think about it - how can any one problem accurately describe how the language performs on a general task? The only way to check those out are from larger-scale case studies (i.e., projects). Experience helps here.

If you really *are* bothered by this, check Jake's code efficiency challenge (http://home.xnet.com/~johnjac/JCEC.htm). You'll see that the oldish compiler versions (VC6, Delphi 5) are absolutely neck and neck (we're talking less than milliseconds in most cases). There's even a challenge where Delphi 5 wins (http://home.xnet.com/~johnjac/JCEC_Scores_Table.htm). Damn that rocket-powered bike!

Don't worry about it. Really. Worry about the invisible demons underneath the bed, patiently waiting for you to fall asleep. That's something to be worried about.

Philth
15-11-2002, 12:38 AM
Before I bought Delphi 2 way back when, I loved how it was so easy to use, and the pascal format is just all me. But I was concerned about speed because I wanted to do games mostly. Back then I read quite a few articles of programs written in MS's VC++ and Delphi and the speeds were nearly identicle in all cases. In the end, this is what ultimately sold me on Delphi. To this day (Delphi5 now) it's just speedy as heck and haven't EVER run into any speed issues with my games .. 2D *or* 3D. Really, it's pretty much up to the person on what they can use better.

Armand
20-11-2002, 06:07 AM
This is exactly the kind of thing that I never, ever, ever get bothered about :).

Delphi is approximately as fast as C++. Sometimes a bit slower. Sometimes a bit quicker. Part of the problem in comparing the two is simply that they require different ways of thinking. If you write a Delphi program as you could a C++ program then you're not taking advantage of some of the finer points of Object Pascal and should change your style.


Heer heer

I work in both. A lot. Speed depends more on your style, what you know about the task your trying to preform and how well you know the langadge your using.

Bottom line. The more you know, the Better your app will run and in most cases the faster you can make it run.
Most low level stuff, your going to start running into limits of the api your using, The OS your on or the hardware running it.



Damn that rocket-powered bike!


Lol..



Worry about the invisible demons underneath the bed, patiently waiting for you to fall asleep. That's something to be worried about.

Yes, they ate my shoes this morning. Problem was my feet were in them at the time. :lol:

ggs
07-05-2003, 09:16 PM
The biggest speed improvements are not what the compiler does, but in the algos you pick to use.

You can write a Visual Basic program which will outproform a finely crafted C++ program, if the C++ program uses bubble sort on a large data set, and the visual basic version uses a quick sort or shell sort.

Good program design will get you much much better speed improvments.

And profile! You do not know were a speed slowdown is till you have profiling data to prove it!

Having said that, things like StringReplace in Delphi shouldnt be used, because it use a poorly designed algo if need the extra speed.

Alimonster
09-05-2003, 09:37 AM
You can write a Visual Basic program which will outproform a finely crafted C++ program, if the C++ program uses bubble sort on a large data set, and the visual basic version uses a quick sort or shell sort.
Even then, it would probably a close-run thing. VB sucks. Ah, don't mind me -- I just feel a lot of hatred towards VB at the moment since I have to use it. :evil:

Introsort is pretty good too.

Anyway, what you said makes a lot of sense and I would like to subscribe to your newsletter.