January 22, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Tschierschke | On Thursday, 16 January 2020 at 14:03:15 UTC, Martin Tschierschke wrote: > On Sunday, 12 January 2020 at 20:29:59 UTC, aberba wrote: >> https://tonsky.me/blog/disenchantment/ >> >> Let's kill the bloat!! >> > Just look at a simple - statically linked - "hello world" DMD compilation result, > how many C64 times floppy discs (180KByte) you would need to store? That's the issue I wanted to address with the thread. Why is a simple 5 lines of code compiling to such a large binary. That's a typical example of bloat. |
January 22, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On Wednesday, 22 January 2020 at 10:38:54 UTC, aberba wrote:
>
>> Just look at a simple - statically linked - "hello world" DMD compilation result,
>> how many C64 times floppy discs (180KByte) you would need to store?
>
> That's the issue I wanted to address with the thread. Why is a simple 5 lines of code compiling to such a large binary. That's a typical example of bloat.
You have the same problem with C++ if you statically link the C and C++ library, then it will easily become over 2 MB. Many don't care because default is that you dynamically link those libraries in C++.
Problem is that D depends on the C library which can be statically linked and then it also becomes bigger. Even if you use just a very small portion of it, it has a tendency you just include everything anyway.
Many languages suffer from the C lib dependency which is kind of suboptimal. It is time to depreciate that dependency.
|
January 22, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to IGotD- | On Wednesday, 22 January 2020 at 10:51:37 UTC, IGotD- wrote: > Many languages suffer from the C lib dependency which is kind of suboptimal. It is time to depreciate that dependency. A recent comparison of languages from this perspective. https://drewdevault.com/2020/01/04/Slow.html |
January 23, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to IGotD- | On Wednesday, 22 January 2020 at 10:51:37 UTC, IGotD- wrote:
> [...]
> Many languages suffer from the C lib dependency which is kind of suboptimal. It is time to depreciate that dependency.
make your syscall library in asm and handle optimally everything from there.
|
January 23, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to FogD | On Wednesday, 22 January 2020 at 23:51:23 UTC, FogD wrote:
> On Wednesday, 22 January 2020 at 10:51:37 UTC, IGotD- wrote:
>> Many languages suffer from the C lib dependency which is kind of suboptimal. It is time to depreciate that dependency.
>
> A recent comparison of languages from this perspective.
>
> https://drewdevault.com/2020/01/04/Slow.html
It would be interesting to know what that huge number of system calls really do, especially when it comes to D which has around 150.
|
January 23, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to FogD | On Wednesday, 22 January 2020 at 23:51:23 UTC, FogD wrote:
> On Wednesday, 22 January 2020 at 10:51:37 UTC, IGotD- wrote:
>> Many languages suffer from the C lib dependency which is kind of suboptimal. It is time to depreciate that dependency.
>
> A recent comparison of languages from this perspective.
>
> https://drewdevault.com/2020/01/04/Slow.html
I don't understand these numbers. When compiling on Linux x86_64 myself with DMD and LDC, I get a 900k executable and a 692k executable, respectively. I also get different results with GCC/Glibc (dynamic: 7.7k, static: 761k), or with the assembly itself (760 bytes).
It's like all the sizes in the blog post are bigger somehow. How am I getting results so wildly different from the post ? I'm a bit puzzled
|
January 23, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laurent Tréguier | On Thursday, 23 January 2020 at 10:01:07 UTC, Laurent Tréguier wrote:
> On Wednesday, 22 January 2020 at 23:51:23 UTC, FogD wrote:
>> On Wednesday, 22 January 2020 at 10:51:37 UTC, IGotD- wrote:
>>> Many languages suffer from the C lib dependency which is kind of suboptimal. It is time to depreciate that dependency.
>>
>> A recent comparison of languages from this perspective.
>>
>> https://drewdevault.com/2020/01/04/Slow.html
>
> I don't understand these numbers. When compiling on Linux x86_64 myself with DMD and LDC, I get a 900k executable and a 692k executable, respectively. I also get different results with GCC/Glibc (dynamic: 7.7k, static: 761k), or with the assembly itself (760 bytes).
> It's like all the sizes in the blog post are bigger somehow. How am I getting results so wildly different from the post ? I'm a bit puzzled
Did you include the size of the C standard library and other related libraries?
"The size of all files which must be present at runtime (interpreters, stdlib, libraries, loader, etc) are included".
--
/Jacob Carlborg
|
January 23, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Thursday, 23 January 2020 at 12:37:22 UTC, Jacob Carlborg wrote:
> Did you include the size of the C standard library and other related libraries?
>
> "The size of all files which must be present at runtime (interpreters, stdlib, libraries, loader, etc) are included".
>
> --
> /Jacob Carlborg
Ah, yes. I still have to learn to read things before writing...
|
January 23, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laurent Tréguier | On Thursday, 23 January 2020 at 10:01:07 UTC, Laurent Tréguier wrote:
> I don't understand these numbers. When compiling on Linux x86_64 myself with DMD and LDC, I get a 900k executable and a 692k executable, respectively. I also get different results with GCC/Glibc (dynamic: 7.7k, static: 761k), or with the assembly itself (760 bytes).
> It's like all the sizes in the blog post are bigger somehow. How am I getting results so wildly different from the post ? I'm a bit puzzled
I cannot reproduce them either. My sizes with official LDC v1.18.0 (same version as used by the author), on Ubuntu 18.04 x64 (author: Arch):
Phobos writeln variant:
ldc2 -O: 990K (in the bog: 10305 KiB)
ldc2 -O -static: 3.0M (incl. glibc)
C puts variant:
ldc2 -O: 478K
ldc2 -O -static: 2.3M
|
January 24, 2020 Re: Pay as you go is really going to make a difference | ||||
---|---|---|---|---|
| ||||
Posted in reply to IGotD- | On Thursday, 23 January 2020 at 00:20:00 UTC, IGotD- wrote:
> On Wednesday, 22 January 2020 at 23:51:23 UTC, FogD wrote:
>>
>> A recent comparison of languages from this perspective.
>>
>> https://drewdevault.com/2020/01/04/Slow.html
>
> It would be interesting to know what that huge number of system calls really do, especially when it comes to D which has around 150.
Indeed. Also to figure out why LDC's binary calls 31 more than DMD's binary.
Much appreciated if someone could repeat the test and post a list of all syscalls being made.
-Johan
|
Copyright © 1999-2021 by the D Language Foundation