D as a Better C

Parke via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Aug 28 15:45:01 PDT 2017


> On Friday, 25 August 2017 at 18:08:06 UTC, Parke wrote:
>> Is there any documentation on how to access and use the minimal runtime?

On Mon, Aug 28, 2017 at 5:22 AM, Kagamin via Digitalmars-d-announce
<digitalmars-d-announce at puremagic.com> wrote:
> Runtime implements language features like boundschecking, it's not used
> explicitly in the code.

I understand that.

On Wed, Aug 23, 2017 at 10:17 AM, Kagamin via Digitalmars-d-announce
> 7.5kb totext.exe (encodes stdin to base64 and writes to stdout) - wrote it
> to put images in xml for opensearch descriptions.
> 12.5kb retab.exe (retabifies source code with various features)
> 5.5kb keepower.exe (manages screen saver and power settings because of
> obnoxious domain policy)
> 14.5kb fsum.exe (computes various hash sums of a file)

Is the source code available for totext.exe, retab.exe keepower.exe,
and fsum.exe?

If the source code were available, I could try compiling them and see
if I could reproduce the nice, small executable sizes you list above.

When I write "hello world" in C, the executable is 8,519 bytes.  When
I write "hello world" in D, the executable is 100 times larger:
865,179 bytes.

Interestingly, "hello world" in C, compiled statically, yields 908,608
bytes.  And "hello world" in assembly yields 368 bytes.

Thanks,

Parke


More information about the Digitalmars-d-announce mailing list