June 01, 2013
Am 31.05.2013 19:19, schrieb deadalnix:
> On Friday, 31 May 2013 at 16:31:42 UTC, Regan Heath wrote:
>> On Fri, 31 May 2013 16:58:11 +0100, Craig Dillabaugh
>> <cdillaba@cg.scs.carleton.ca> wrote:
>>
>>>>
>>>> Under 40 kilobytes! If you do the bare minimum you can get down to
>>>> about 1 KB, but at that point, you're actually writing in mostly
>>>> (inline) assembly rather than D. The code in the link though
>>>> supports a majority (though certainly not all) of D's features.
>>>>
>>>>> Agreed 100%.  But newcomers don't often get that far down the chain
>>>>> of thought, they just see a huge exe and wonder WTF! :)
>>>>
>>>> Indeed.
>>>
>>> Do you really think that is such a big issue?
>>
>> Not really an issue, no.  But newcomers keep creating threads like
>> this one time and again and who knows how many have been turned away
>> without finding out the whys and wherefores.
>>
>> R
>
> A hello wold in java, statically compiled, was 52Mb last time I
> tried.

It is the same thing in the Go mailing list, new developers just aren't
used to static binaries. Additionally when they look at the size of modern languages, which tend to have JIT based canonical implementations, the size of the already installed runtime tends to be forgotten.

--
Paulo
June 01, 2013
Am 31.05.2013 19:21, schrieb Rob T:
> On Friday, 31 May 2013 at 16:52:53 UTC, Jonathan M Davis wrote:
>> On Friday, May 31, 2013 18:05:16 Rob T wrote:
>>> I've seen this happen with 2.062, if you take out -noboundscheck
>>> it may reduce the size significantly and compile a lot faster.
>>> Makes no sense.
>>
>> My first guess would be that more ends up being inlined with
>> -noboundscheck due
>> to the differences in the code that's being generated, but I really
>> don't knw.
>>
>> - Jonathan M Davis
>
> I discovered this last night while playing around with the raytrace
> performance issue a few threads back. I noticed that Derelict was being
> built without -noboundscheck so I put the flag in to see what if
> anything would happen.
>
> The difference is from a few kilobytes per lib to a few megabytes per
> lib, so it's a drastic increase and it takes a lot more time to build.
> This may be something that should be investigated further.
>
> --rt

dmd is not alone in this regard.

There is a presentation from Chandler Carruth on the last LLVM conference, http://llvm.org/devmtg/2013-04/ where he rants about that in C++ code.

Basically there are some use cases in C++ where the optimizer currently does the wrong thing and the generated code increases exponentially.

--
Paulo
June 01, 2013
On Friday, 31 May 2013 at 16:31:42 UTC, Regan Heath wrote:

>>
>> Do you really think that is such a big issue?
>
> Not really an issue, no.  But newcomers keep creating threads like this one time and again and who knows how many have been turned away without finding out the whys and wherefores.
>
> R

Maybe it's a question that could be addressed through the wiki then ?
June 01, 2013
On Friday, 31 May 2013 at 14:33:48 UTC, khurshid wrote:
> I just download dmd 2.063, and compile simple "hello world" program:
>
> // hello.d
> import std.stdio;
> int main()
> {
>     writeln("hello world");
>     return 0;
> }
>
>
> with -O -release -inline -noboundscheck  flags.
>
> And size of result output file  'hello'  equal to 1004.1 Kbyte !!!
> Why size is big?
>
>
> I'm using  fedora 14, 32-x.
>
>
> Regards,
>  Khurshid.

Without -noboundscheck hello executable is only 340.6 kbyte.

Compiled using dmd 2.062 on Debian 6.

--rt
1 2 3
Next ›   Last »