On C/C++ undefined behaviours
Nick Sabalausky
a at a.a
Sat Aug 21 00:11:07 PDT 2010
"Walter Bright" <newshound2 at digitalmars.com> wrote in message
news:i4nqnk$19fd$2 at digitalmars.com...
> Nick Sabalausky wrote:
>> If I have to use a program written in Language-X for awhile before it
>> stops being slow, then I'm going to feel perfectly justified in calling
>> Language-X a slow language.
>
> Also consider that Java really doesn't give you much to work with if you
> want to take hand-tuning past a certain point.
>
Absolutely. In fact, that's why I take issue with all those old Java
benchmarks that would compare Java code to *equivalent* C/C++ code
(allegedly for the sake of a fair apples-to-apples): The C/C++ code can be
further optimized, the Java can't. With .NET, you maybe can optimize to a
certain extent, just because at least it *allows* pointers (although the
type system gets in the way a lot - I once tried to convert a buffer to a
struct in C# (think "idiomatic-C way to load a BMP-header"), and I spent
hours trying to figure out how to do it without any
copying/allocation/runtime-reflection before finally concluding "If it's
possible, I no longer care how". In C/C++/D, I can do it with just a simple
cast).
More information about the Digitalmars-d
mailing list