I only have limited C (and extremely limited C++) coding
abilities, but I have done a few PB v C speed comparisons.
My first was the Blowfish algorithm which I translated to
PB from C and the second was a string binary representation
of ascii characters (those hanging out in #visualbasic are aware
of the almost maniacle contest which was going on and lasted
for nearly 7 days).
In any case, as far as i can tell, PB is not faster than
C code that is compiled under Visual C++ 6.0. PB is fast,
but it seems significantly slower than equivalent C apps.
My own Blowfish translation required inline asm in order to
beat the VC compiled C version.
Some people on this board are always saying how PB is
as fast or faster than C, but at this point, I think its just
alot of talk with no real substantiated evidence to back
it up. I realize PowerBASIC has never made this claim, only
some of the people on this board. So to those people on this
board, put up some actual benchmarks WITH C and PB source, else
give that argument a rest. (or keep it up with the knowledge that
other more scrutinizing individuals are going to take what you
say with a grain of salt.)
As far as I'm concerned, PB is fast enough and with the inline
asm support, you can write anything you want with the true
potentional to make it peform as fast as possible. But in
terms of strict C (or C++) performance comparison, PB comes up
short. One thig is certain, PB definetly produces the smallest
EXE's. That alone should tip people off that PB exe's may not
be as fast as C exe's compiled under VC (especially when compiler
options for fast code are used.) In most real world scenarios,
you cant have both the fastest code and the smallest exe at
the same time. Again, if you think PB is faster, prove it.
Recently in all of these OOP threads, this board has practically
degenerated into a run of the mill programming language flame
war. PB versus VB, PB versus COM, PB versus OO, PB versus
bloatware. Never mind the fact that all of the afore mentioned
tools have their place in the world. Never mind the fact that
people can make a good living using all of the afore mentioned
tools. Some of the zealots on this board refuse to accept the
idea of using the "right tool for the job." Sounds too much like
the C zealots who think coding in VB is a sin. Code is the right
way or no way attitude. Thankfully most of the world doesnt
think that way which is evident by the huge (and well paying)
VB job market.
Back to C and C++. I can accept the bloatware argument when
talking about PB versus VB, but PB versus C++? (and im not
talking about COM, just OOP under C++.) To me, calling OOP
under C++ bloatware is just rediculous. I'll say this, OOP
under C++ may very well be faster than PB. Sure the exe size
are larger, but for the benefit of speed its a very desireable
tradeoff. You prefer slower performance with a smaller exe?
Thats fine, but you're probably in the minority.
Prove me wrong. Lets get some C, C++ and PB translations up here
and see the results instead of just talking out of our rears and
speculating. Talk is cheap. I have a funny feeling that nobody
will want to persue this performance comparison. In fact, i get
the feeling that some people on this board would rather come up
with clever arguments as to why C++ OO code would simply have to
be slower than the best PB equivalent. If anyone is willing to
help on the C/C++ side, I can help with the PB translations.
-Mike
------------------
abilities, but I have done a few PB v C speed comparisons.
My first was the Blowfish algorithm which I translated to
PB from C and the second was a string binary representation
of ascii characters (those hanging out in #visualbasic are aware
of the almost maniacle contest which was going on and lasted
for nearly 7 days).
In any case, as far as i can tell, PB is not faster than
C code that is compiled under Visual C++ 6.0. PB is fast,
but it seems significantly slower than equivalent C apps.
My own Blowfish translation required inline asm in order to
beat the VC compiled C version.
Some people on this board are always saying how PB is
as fast or faster than C, but at this point, I think its just
alot of talk with no real substantiated evidence to back
it up. I realize PowerBASIC has never made this claim, only
some of the people on this board. So to those people on this
board, put up some actual benchmarks WITH C and PB source, else
give that argument a rest. (or keep it up with the knowledge that
other more scrutinizing individuals are going to take what you
say with a grain of salt.)
As far as I'm concerned, PB is fast enough and with the inline
asm support, you can write anything you want with the true
potentional to make it peform as fast as possible. But in
terms of strict C (or C++) performance comparison, PB comes up
short. One thig is certain, PB definetly produces the smallest
EXE's. That alone should tip people off that PB exe's may not
be as fast as C exe's compiled under VC (especially when compiler
options for fast code are used.) In most real world scenarios,
you cant have both the fastest code and the smallest exe at
the same time. Again, if you think PB is faster, prove it.
Recently in all of these OOP threads, this board has practically
degenerated into a run of the mill programming language flame
war. PB versus VB, PB versus COM, PB versus OO, PB versus
bloatware. Never mind the fact that all of the afore mentioned
tools have their place in the world. Never mind the fact that
people can make a good living using all of the afore mentioned
tools. Some of the zealots on this board refuse to accept the
idea of using the "right tool for the job." Sounds too much like
the C zealots who think coding in VB is a sin. Code is the right
way or no way attitude. Thankfully most of the world doesnt
think that way which is evident by the huge (and well paying)
VB job market.
Back to C and C++. I can accept the bloatware argument when
talking about PB versus VB, but PB versus C++? (and im not
talking about COM, just OOP under C++.) To me, calling OOP
under C++ bloatware is just rediculous. I'll say this, OOP
under C++ may very well be faster than PB. Sure the exe size
are larger, but for the benefit of speed its a very desireable
tradeoff. You prefer slower performance with a smaller exe?
Thats fine, but you're probably in the minority.
Prove me wrong. Lets get some C, C++ and PB translations up here
and see the results instead of just talking out of our rears and
speculating. Talk is cheap. I have a funny feeling that nobody
will want to persue this performance comparison. In fact, i get
the feeling that some people on this board would rather come up
with clever arguments as to why C++ OO code would simply have to
be slower than the best PB equivalent. If anyone is willing to
help on the C/C++ side, I can help with the PB translations.
-Mike
------------------
Comment