"Competitive Advantage with D" is one of the keynotes at C++Now 2017
Ola Fosheim Grøstad via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sat Apr 29 07:37:57 PDT 2017
On Saturday, 29 April 2017 at 14:13:18 UTC, Patrick Schluter
wrote:
> That's not a simple assumption, it's acknowledgment that a C
> program runs on real
> hardware not a virtual machine like Java or C#.
Modern X86s are basically virtual machines... The instruction set
is decoded and executed on a completely different machine than
the original X86.
>> This is no longer true of course, as "registers" are "SIMD
>> sized".
>
> SIMD and GP are not related and one will never replace the
> other. SIMD is generally for floating point, when it is used
> for integer, it is not for the usual integer semantics and
> requires special handling in any case.
Huh? No, at least on X86 the register is only bits. You can mask
floats with ints.
>> So I am pretty sure it will lead to suboptimal code in some
>> instances.
>
> Can also be said if it had another semantic.
Not sure what you mean here. If every byte is recast to 32bit
then you have to prove that it ends up with the same result when
computed as 8bit.
In C it is cast to the register size (16bit, 32bit or 64bit),
because C was designed for 40 years old CPUs where you had a
fixed word size (register size).
D has locked int to 32 bit, so the register argument no longer
makes sense.
> For the same reason it is in C. If the ambition for D is to be
> a system language then it should avoid introducing artificial
> abstractions and work with the machine it runs on, not against.
But the C environment no longer works well with the machine it
runs on. It is archaic and doesn't really reflect the underlying
hardware well. It may seem like it does, but that's only because
hardware vendors target C-generated code...
More information about the Digitalmars-d-announce
mailing list