Brandon Bray said:
I am certainly not trying to make excuses for the product. The observable
differences in the style are as expected and by design. That does not make
it inferior.
I see your point. I guess, my dissapointement has more to do with the
fact, that I did not know prior to my tests, that Microsoft is
selling in fact different product under standard version. Because of
my prior experience with Borland I simply didn't expect that.
From the certain point of view it reminds me the same marketing
scheme of NVIDIA, which sold under the generic name of GeForce 4
two different chips with two different price points. The cheaper
version was actually renamed beefed up GeForce 2 chip, worse than the
older GeForce 3 chip. If one knew that, one could say, that it is not
the big deal, if you did not know that it was a dirty trick from the
certain point of view. Same by the way is now with the USB 2.0 High
speed and USB 2.0 full speed. How many people belive, that this
marketing scheme is crystal clear and fair ? I don't dispute, that the
information is out there, but many customers probably will buy the
product without knowing the fact.
Of course, saying that the math libraries in Visual C# are better than the
Visual C++ libraries is highly suspicious. If you really believe that, it
would be far more important to isolate the math library by itself and
benchmark that. As done, the information is highly inconclusive.
What is suspicious, is rather why C++ square root function in either
Borland or Microsoft version is two to three times slower that C# version
without any gain in accuracy. My concern about the libraries, it is
simply my guess about the cause. Since the code between various high math
functions in test # 2 is identical with the exception of library call,
then the major increase of C# advantage over C++ (either Borland or
Microsoft) for some of the functions can be only attributed to the
differences between the library function implementation. How otherwise
would you explain, that the arctan() test has very similar timing between
C++ and C# versions of the code, but when the single library call in the
code is changed from arctan() to exp() or sqrt(), suddenly C# executes
otherwise the same code two to three times faster than C++ with the same
accuracy ? What exactly changed in optimalization ? There maybe a very
good scientific explanation, that for example C++ libraries are more
stable at extreme exotic input etc., but as a occasional user I'm not
in a position to either prove it or really care about it. It is similar
to the famous Pnetium FDIV flaw, that affected mainly experts but for
everyday occasional programmers had no impact whatsoever (except FUD
of course
).
I disagree also about approach. If my aprroach is to calculate
particular integral (as I'm doing in the test # 2), C# won in most cases
by a large margin over non optimized C++ by Microsoft and over
supposedly highly optimized C++ by Borland. As a end user I don't care
what is the exact cause of C++ being slower. All I care is to have my
program run as fast as it can. In any case either library was bad or
the information exchange mechanism between the library and program was
crippled or something else. You should not expect from the occasional
end user to make a scientific analysis why his program that is written
in a conventional, acceptable way is uderperforming on the theoretically
better platform. What is then better in that platform ? The occasional
user should be advised to run the platform that generates the fastest
code most of the time without tweaking.
For the expert your approach is absolutely right but it is not for
the target user of my test.
JM