digitalmars.D.learn - Systems programming
- Andreas Kochenburger (6/6) Sep 14 2006 Is D really suitable for systems programming, despite its inline assembl...
- nobody (5/7) Sep 14 2006 In the DMD compiler the inline assembler has to be explicitly enabled wi...
- James Pelcis (7/14) Sep 14 2006 Using -inline doesn't enable the inline assembler. If the compiler
- nobody (2/17) Sep 14 2006 Thanks for the reply. I completely misread the OP. You are absolutely ri...
- clayasaurus (8/13) Sep 14 2006 The smallest exe size I got on win with dmd v.166 is 65 KB using
- Andreas Kochenburger (6/12) Sep 15 2006 I would guess this is due to some statical linkage.
- Pragma (12/28) Sep 15 2006 You'd be correct in that guess. Near as I can tell, nobody has tried
- Pragma (14/16) Sep 14 2006 I think so. D takes on some bloat due to the GC support and TypeInfo.
Is D really suitable for systems programming, despite its inline assembler? What is the smallest executable size in Win or Linux? Where can I find a minimum stub? Andreas ----- Beware of mad dogs and retired state employees.
Sep 14 2006
Andreas Kochenburger wrote:Is D really suitable for systems programming, despite its inline assembler?In the DMD compiler the inline assembler has to be explicitly enabled with the -inline argument: http://digitalmars.com/d/dcompiler.html I can't say anything about the smallest executable size.
Sep 14 2006
nobody wrote:Andreas Kochenburger wrote:Yes. The larger the project, the more D will help.Is D really suitable for systems programming, despite its inline assembler?In the DMD compiler the inline assembler has to be explicitly enabled with the -inline argument: http://digitalmars.com/d/dcompiler.htmlUsing -inline doesn't enable the inline assembler. If the compiler supports it and you are using the right architecture, the inline assembler is automatically enabled. Using -inline gets rid of small functions by essentially transforming the function call into the code of the function.
Sep 14 2006
James Pelcis wrote:nobody wrote:Thanks for the reply. I completely misread the OP. You are absolutely right.Andreas Kochenburger wrote:Yes. The larger the project, the more D will help.Is D really suitable for systems programming, despite its inline assembler?In the DMD compiler the inline assembler has to be explicitly enabled with the -inline argument:Using -inline doesn't enable the inline assembler. If the compiler supports it and you are using the right architecture, the inline assembler is automatically enabled. Using -inline gets rid of small functions by essentially transforming the function call into the code of the function.
Sep 14 2006
Andreas Kochenburger wrote:Is D really suitable for systems programming, despite its inline assembler? What is the smallest executable size in Win or Linux? Where can I find a minimum stub?The smallest exe size I got on win with dmd v.166 is 65 KB using --- int main() { return 0; } ---
Sep 14 2006
"clayasaurus" <clayasaurus gmail.com> schrieb im Newsbeitrag news:eecf69$1p6n$1 digitaldaemon.com...The smallest exe size I got on win with dmd v.166 is 65 KB using --- int main() { return 0; }I would guess this is due to some statical linkage. In theory the exe should not be larger than a few k, depending on the PE header structure, but I am no expert in that. Andreas
Sep 15 2006
Andreas Kochenburger wrote:"clayasaurus" <clayasaurus gmail.com> schrieb im Newsbeitrag news:eecf69$1p6n$1 digitaldaemon.com...You'd be correct in that guess. Near as I can tell, nobody has tried unpacking the rudimentary libs that DMD (windows) tends to link in: phobos.lib and snn.lib. I bet that if you unpack those lib files, and feed only the .obj files needed to the linker, you'd end up with a smaller program. Either that, or there's a design flaw in the D runtime that pulls in a *lot* of un-needed code. (I seem to recall a debate between Walter and Kris on that very topic a while back... I think printf could be the culprit.) -- - EricAnderton at yahooThe smallest exe size I got on win with dmd v.166 is 65 KB using --- int main() { return 0; }I would guess this is due to some statical linkage. In theory the exe should not be larger than a few k, depending on the PE header structure, but I am no expert in that. Andreas
Sep 15 2006
Andreas Kochenburger wrote:Is D really suitable for systems programming, despite its inline assembler?I think so. D takes on some bloat due to the GC support and TypeInfo. I'd consider those fair trade-offs as you probably wouldn't be using D if not at least for the GC.Where can I find a minimum stub?Andreas, have you given Ares a try yet? I think that comprises the most minimal stub for D so far: http://www.dsource.org/projects/ares Granted, this will likely net you the largest gains on the Windows side of the house. Aside from that, there's probably some gains to be made with GDC, and playing around with GCC's optimizations and whatnot, but I'm a complete n00b in that area. :( -- - EricAnderton at yahoo
Sep 14 2006