I've decided to break down and actually do the comparison that seems to
be continually in demand. However, in the name of fairness and
conservation of (my) resources, I'm not going to do it alone. Here's my
plan:
The goal is to compare Delphi, BCB and VC++ at the code level from a
performance perspective. I've made some very simplistic passes at this
in the pass, but to do it correctly requires more "real world" code
examples. Additionally, the comparison should be divided into several
areas (string, integer, floating point that sort of thing) and several
programming styles or approaches. Off the top of my head I thought
maybe 'literal translations', 'simplest code' and 'fastest possible'.
For example, given a string based snippet, the literal translations
would both (Pascal and C++) be pchar based, use while's etc with the
goal being that they be as similar a possible. For the simplest code
approach, the OP code would be string based, use built in functions etc.
For the fastest possible approach there would be no constraints, just
let 'er rip.
It would be nice to have several examples for each combination of coding
approach and target area so as you can see this is not a small project.
Consequently, I think that Code Central would provide the most
appropriate venue for this effort with one entry for each
routine/algorithm. Code Central now allows threaded commentary/review
by others and so provides an easy means of allowing group participation
on each entry. Thus the current contents of the entry would eventually
represent the consensus view for each approach. With appropriate
designation anybody could contribute the initial problem with the
understanding that they would be responsible for updating the entry with
the latest versions for each language and compiler and each programming
level. If anyone wants to submit an algorithm but doesn't want to
handle the babysitting then they can send it to me and I'll handle the
drudgework.
What say you? Given the amount of oxygen expended in just the most
recent go-round in the C++ vs OP debate surely there are some who would
be willing to participate in this? What I most need is one or more
people to champion the C++ side, and of course those "real" world
examples. Also there are a few niggling details to hash out.
--
Bob Lee
High Performance Delphi - http://www.econos.com/optimize/