Delphi exe speed vs VB exe speed? 
Author Message
 Delphi exe speed vs VB exe speed?

MenuI asked this before with no response but here goes again.
How does a delphi exe compare with a VB exe speed wise running the same
algorithms?

------------------------------------------------------------------------
Chuck Stuart - Mesquite TX USA  
VBTrace 2.00 is a runtime Procedure Trace/XReference/Debug/Profiler and
much more. Shareware $49.95.
Available from ftp.apexsc.com/pub/cgvb/visitor.
------------------------------------------------------------------------



Fri, 05 Sep 1997 07:55:44 GMT  
 Delphi exe speed vs VB exe speed?

Quote:
(Chuck Stuart) writes:

> MenuI asked this before with no response but here goes again.
> How does a Delphi exe compare with a VB exe speed wise running the same
> algorithms?

I've only had Delphi for a couple of days, but I've run a few tests:-

In another thread in this newsgroup ('Why is there a d.p. limit') there is
a VB program for calculating PI. I converted that to run in Delphi, on
the basis that it is processor intensive and the compiled Delphi code
should be a lot faster. The VB version takes 19 seconds on a 66MHz 486,
the Delphi version takes 3 seconds.

A second test loading the picture property of one image from another image,
which would be almost entirely API calls, took exactly the same time in
Delphi as it did in VB.

I also tried some tests making calls to functions in DLLs, again the
performance was the same.

Overall Delphi is definitely going to give some performance increase,
how significant it is will depend on the nature of your app.

BUT I think Delphi has some problems, I'm certainly not going to
start using it for anything serious. It might be what every Turbo Pascal
programmer has always wanted, but if your background isn't Pascal it is
very difficult to get into. How can anyone supply a compiler without a
language reference?! Also you're not protected from the harsh realities
of Windows programming anything like as much as you are with VB. E.g. it
took me hours to work out how to persuade an app to start minimised if
'Run Minimized' is checked in its properties box in Program Manager!

-----------------------------------------------------------------------
Roger Barker   { Have you heard about the compiler that was famous for }
Boston, UK     { less time than it took to work out how to use it?     }



Fri, 05 Sep 1997 23:55:39 GMT  
 Delphi exe speed vs VB exe speed?

Quote:
>How can anyone supply a compiler without a
>language reference?!

Why not?  Microsoft did it:  what purports to be a "language
reference" is really mostly library and control property
documentation.  E.g.,  where is the scope of a statement label
documented?  Most non-BASIC programmers would assume
it's only valid within the procedure where it's defined.  Which,
of course,  it's not (as I learned the hard way...).

Quote:
> Also you're not protected from the harsh realities
>of Windows programming anything like as much as you are with VB.

VB doesn't "protect" you from harsh realities so much as it conceals
them,  giving the illusion that you have a proper program when you
don't.  E.g.,  it's very bad practice in nearly all cases to overwrite an
existing file without asking.  Standard C (and,  I presume,  Pascal)
I/O librarires make it easy to avoid this.  VB makes it almost
impossible to do so cleanly.  The result is applications like
Netcom's NetCruiser,  which blithely destroys irreplaceable
files without warning,  and crashes because of conditions that could
easily be handled in other languages.

Ran



Sat, 06 Sep 1997 20:14:03 GMT  
 Delphi exe speed vs VB exe speed?

Quote:


> Talbott) writes:


> Barker) writes:

> > >How can anyone supply a compiler without a
> > >language reference?!

        Everybody's complaining about no language reference for Delphi.
I have a language reference online (there's a link to it on the
contents page of delphi.hlp). Is this just because I paid the extra $35
or does everybody have one online?
        (I'll be much happier when the paper version arrives, of course...)
Dave Ullrich


Mon, 08 Sep 1997 05:09:57 GMT  
 Delphi exe speed vs VB exe speed?
X-Newsreader: WinVN 0.91.4


(Roger Barker) says:

Quote:


>(Chuck Stuart) writes:

[snip]
>In another thread in this newsgroup ('Why is there a d.p. limit') there
is
>a VB program for calculating PI. I converted that to run in Delphi, on
>the basis that it is processor intensive and the compiled Delphi code
>should be a lot faster. The VB version takes 19 seconds on a 66MHz 486,
>the Delphi version takes 3 seconds.

[snip]

Let's get scientific here. Could someone please post the two algorithms,
in their entirety, in VB and Pascal so we can look at them. In
particular, I would be most curious to then translate it to C and try on
the same platform.

I have found, to date, that VB code executes surprisingly fast and that
in general arithmetic is pretty good. However, of course, VB cannot
optimise the internals out of a loop and so its not a completely fair
comparison.



Mon, 08 Sep 1997 10:48:22 GMT  
 Delphi exe speed vs VB exe speed?

Quote:

>X-Newsreader: WinVN 0.91.4

>Let's get scientific here. Could someone please post the two algorithms,
>in their entirety, in VB and Pascal so we can look at them. In
>particular, I would be most curious to then translate it to C and try on
>the same platform.

>I have found, to date, that VB code executes surprisingly fast and that
>in general arithmetic is pretty good. However, of course, VB cannot
>optimise the internals out of a loop and so its not a completely fair
>comparison.

This will certainly open up the age-old bemchmark debate but I just wanted
to comment on "optimizing loops". It may not be fair but in the real world
loops are a fact of life-- the more you do the slower things get. One of
my projects was to write a terminal emulator for WYSE60. I never got past
the prototype stage where I emulated vt100 because there were too many
loops involved in things like simple line scrolls (where you have to account
for background attributes as well as the foreground characters). A truly
compiled program should significantly speed execution in cases like this.

Dave Hunt
Cedar Rapids, Iowa



Mon, 08 Sep 1997 22:20:44 GMT  
 Delphi exe speed vs VB exe speed?
[From... deleted]
: >>
: [snip]
: >In another thread in this newsgroup ('Why is there a d.p. limit') there
: is
: >a VB program for calculating PI. I converted that to run in Delphi, on
: >the basis that it is processor intensive and the compiled Delphi code
: >should be a lot faster. The VB version takes 19 seconds on a 66MHz 486,
: >the Delphi version takes 3 seconds.
: >
: [snip]

: Let's get scientific here. Could someone please post the two algorithms,
: in their entirety, in VB and Pascal so we can look at them. In
: particular, I would be most curious to then translate it to C and try on
: the same platform.

: I have found, to date, that VB code executes surprisingly fast and that
: in general arithmetic is pretty good. However, of course, VB cannot
: optimise the internals out of a loop and so its not a completely fair
: comparison.

Of course this is a fair comparison.  The question was simply 'Which
is faster?'  It doens't matter whether one can optimize or not.  Just
which is faster (and yes I realize there could be something tricky
going on which speeds things up but might be unstable - I'm assuming
Delphi isn't doing anything any more likely to crash Windows then VB
is).

Randy



Mon, 08 Sep 1997 20:40:42 GMT  
 Delphi exe speed vs VB exe speed?

writes:

Quote:

> X-Newsreader: WinVN 0.91.4


> (Roger Barker) says:
> >In another thread in this newsgroup ('Why is there a d.p. limit') there
> is
> >a VB program for calculating PI. I converted that to run in Delphi, on
> >the basis that it is processor intensive and the compiled Delphi code
> >should be a lot faster. The VB version takes 19 seconds on a 66MHz 486,
> >the Delphi version takes 3 seconds.

> [snip]

> Let's get scientific here. Could someone please post the two algorithms,
> in their entirety, in VB and Pascal so we can look at them. In
> particular, I would be most curious to then translate it to C and try on
> the same platform.

> I have found, to date, that VB code executes surprisingly fast and that
> in general arithmetic is pretty good. However, of course, VB cannot
> optimise the internals out of a loop and so its not a completely fair
> comparison.

If you look at that piece of code you will see why I used it - I'd
challenge any compiler to optimise the loops out of it! It started
life as the folowing bit of 'obfuscated C':-

long a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,
g=c*2;c:-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,
d/=g--,--b;d*=b);}     :-)

In a processor intensive task, there is no way that interpreted 'p' code
can compete with compiled code. A more interesting question is how does
Delphi compare to VB on database apps - for speed, ease of use and ease
of distribution?

-----------------------------------------------------------------------
Roger Barker   { Have you heard about the compiler that was famous for }
Boston, UK     { less time than it took to work out how to use it?     }



Tue, 09 Sep 1997 16:18:28 GMT  
 Delphi exe speed vs VB exe speed?

said:

Quote:
>compete with compiled code. A more interesting question is how does Delphi
>compare to VB on database apps - for speed, ease of use and ease of

I have setup VB and Delphi talk to Watcom SQL server.
The simple apps select data from multiple tables.
Delphi appears to be a little faster. I think database
app speed is more a depend on SQL server than
the languages. Anyway, I think data access in Delphi
is much easier to use than both VB and Access.

--



Wed, 10 Sep 1997 10:09:04 GMT  
 Delphi exe speed vs VB exe speed?

Quote:
>In a processor intensive task, there is no way that interpreted 'p' code
>can compete with compiled code. A more interesting question is how does
>Delphi compare to VB on database apps - for speed, ease of use and ease
>of distribution?

I have only had Delphi for a little while and I find it to be much faster
than VB in both database and painting.  I dl'd a Delphi vs. VB and Delphi
vs. PB off of compu$erve (GO DELPHI) and although it is a biased view, the
author makes a great case for Delphi.

However the learning curve for Object Pascal is a bit higher than for VB.
It also is very sensitive to syntax and structure. If I were as good in Delphi
as I was in VB I would use Delphi all the time.  (I cant wait to see who
catches this statement....)

I still think that VB vs PB or VB vs Delphi is incorrect.  You can only compare
VB and Delphi in the IDE (delphi wins unless you use VBAssist 3.x)

Bottom line is that Delphi really is about 20-30 times faster in most areas.



Wed, 10 Sep 1997 11:33:41 GMT  
 Delphi exe speed vs VB exe speed?

Quote:

> I still think that VB vs PB or VB vs Delphi is incorrect.  You can only
compare
> VB and Delphi in the IDE (delphi wins unless you use VBAssist 3.x)

> Bottom line is that Delphi really is about 20-30 times faster in most areas.

Well according to Borlands own Product info guide, Delphi is 10-20 times faster
than interpreted p-code.  The only actual comparisons I have seen are between
Powerbuilder and Delphi,  not VB.  Be curious to see some actual stats.


Fri, 12 Sep 1997 16:57:06 GMT  
 Delphi exe speed vs VB exe speed?
 -=> Quoting  to ALL <=-

 > Newsgroup: comp.lang.basic.visual.misc
 > Organization: Peak Systems


 > Mayo)  writes:
 >
 > X-Newsreader: WinVN 0.91.4
 >

 > (Roger Barker) says:
 > >In another thread in this newsgroup ('Why is there a d.p. limit') there
 > is
 > >a VB program for calculating PI. I converted that to run in Delphi, on
 > >the basis that it is processor intensive and the compiled Delphi code
 > >should be a lot faster. The VB version takes 19 seconds on a 66MHz 486,
 > >the Delphi version takes 3 seconds.
 > >
 > [snip]
 >
 > Let's get scientific here. Could someone please post the two algorithms,
 > in their entirety, in VB and Pascal so we can look at them. In
 > particular, I would be most curious to then translate it to C and try on
 > the same platform.
 >
 > I have found, to date, that VB code executes surprisingly fast and that
 > in general arithmetic is pretty good. However, of course, VB cannot
 > optimise the internals out of a loop and so its not a completely fair
 > comparison.

 > If you look at that piece of code you will see why I used it - I'd
 > challenge any compiler to optimise the loops out of it! It started
 > life as the folowing bit of 'obfuscated C':-

 > long
 > a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,
 > g=c*2;c:-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,
 > d/=g--,--b;d*=b);}     :-)
 > In a processor intensive task, there is no way that interpreted 'p'
 > code  can compete with compiled code. A more interesting question is
 > how does Delphi compare to VB on database apps - for speed, ease of use
 > and ease  of distribution?

 > -----------------------------------------------------------------------
 > Roger Barker   { Have you heard about the compiler that was famous for
 > } Boston, UK     { less time than it took to work out how to use it?  
 > }

Well, to be fair, it's not all compiled code, is it, even in C.
I note that you have a "printf" statement in your code.  The amount
of interpretation that a C run-time library has to do to parse the
format string and try to make sense of the remaining arguments in the
call is quite large.  You run-time library is running a mini-interpreter
to generate the correct "printf" output.  Don't fool yourself into thinking
that you code is totally "compiled".
John

... Catch the Blue Wave!
~~~ Blue Wave/RA v2.12 [NR]

-----------------------------------------------------------------------------

This message was processed by RAuucp from Merlin Systems Inc.
-----------------------------------------------------------------------------



Mon, 15 Sep 1997 03:00:00 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Delphi speed vs VB speed?

2. VB 3.0 speed vs. VB 4.0 speed

3. VB3 vs. VB4: exe speed

4. VB6 Speed vs VB.Net Speed

5. VB vs Delphi: Speed Trial

6. Speed, Speed, and Speed!

7. Speed Speed Speed - Cutting down on wasted cycles

8. p-code, native code, size of exe, distribution size, and speed

9. How to speed up EXE program

10. Floating Point Speed - Comparison of VB 5.0, Delphi 3.0, and VC 5.0

11. (long) Not Rocket Science, Computer Science: VB/Delphi graph speed

12. VB vs C# Application Speed

 

 
Powered by phpBB® Forum Software