Carl Daniel said:
And yet the test results that I posted prove just that case: when compiled
with the optimizing compiler, your two flavors of code have nearly identical
performance.
And I don't dispute that. I belive that the controversy of treating
two different styles of programming with almost double time penalty
for one style over the other is an issue of non optimized code. I
consider that ridiculous but that is beyond the issue here. Keep in
mind, that once I realized the problem, for the comaprison tests I was
using coding style that generates the faster code. I still challenge
the opinion that the optimization of my very simplistic code would
change MS VC++ in any significant way to help in any meaningfull way
the outcome of the tests against C# or BCB. VC++ was especially bad in
test #2 where it lost by a large margin on the run time library math
functions. Could you explain, what makes VC++ to execute squrare root
function more than twice as long as C# ? This function is already
compiled in DLL library and optimizer would do squat here. It maybe
that optimization would put VC++ on a better place in test # 3, but in
that test the difference between the best Borland and the worst VC++
was within 10% which is not a big deal.
I didn't check myself, but I believe Brandon Bray indicated
that they in fact generate identical machine code. The conclusions you
present on the web site are misleading at best, and highly suspect in any
case. If nothing else, I see no justification for the leap from "bechmark 2
was faster than benchmark 1" to "I'll do all my coding in this style" based
on a single data point of un-optimized code.
Absolutely not misleading. Majority of occasional programmers will buy
Standard version of the software. The enigmatic "non optimized
compiler" is not very clear for those buyers, what they are getting
into. Before I run those tests I would never suspect that it would
mean almost doubling execution time if the programmer was using old
"C" type coding style where all the declarations are put at the top of
the function. I consider my test to be a very good warning for those
people who like me are yet unaware of it. I would probably skip the
purachase of the product if I knew beforehand that it behaves like
this. My experience with Borland was such, that the Standard version
(which is called in Borland - Personal) was very decent but lacked
many optimizing tools, components available in higher versions and had
a restrictive license. But Borland compiler never behaved so badly
depending on coding style. Niether does Microsoft C# Standard for that
matter. You guys are lucky to have optimizing version of the compiler
and that's good for you. But there are only handful of people ready to
invest $1000 into the software used sparringly. For those folks my
results are not misleading at all. They are in fact perfect warning to
look into some other competitor products and competitive langugaes
such as Microsoft own C# for example.
JM