version=D_16

Martin Tschierschke via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 12 02:38:13 PDT 2017


On Monday, 10 July 2017 at 23:01:50 UTC, Luís Marques wrote:
> On Monday, 10 July 2017 at 22:39:22 UTC, Petar Kirov 
> [ZombineDev] wrote:
>> The problem Walter pointed to is that due to integer 
>> promotion, arithmetic operands of types smaller than int are 
>> converted to int, hence even if you use bytes and shorts you 
>> would end up using ints, which are expensive on CPUs with no 
>> native 32-bit registers. In theory, you could write your code 
>> so that it's easy for the optimizer to prove that you're only 
>> using 8 or 16 bits and variables would fit in single 
>> registers, so you would be able to get away without a 
>> performance penalty for using a language where ints are 32-bit.
>
> Ah, that makes sense. Thanks for clarifying. For me it hasn't 
> proved a problem, but I could see it being if you do a lot of 
> arithmetic with 16-bit integers.

I just want to point out, that my impression is that the maker 
scene
using all this 16 bit Arm Arduino and what ever micro controllers,
would be happy to have D as an alternative for coding in C.
So BetterC and D_16 might attract a way bigger community than many
other might think. Even if this reduced language might need to be 
named D-- :-).


More information about the Digitalmars-d mailing list