Re: File size

2023-08-24 Thread harakim via Digitalmars-d-learn
On Wednesday, 23 August 2023 at 08:48:26 UTC, FeepingCreature wrote: That's hilarious! I'm happy you found it. Me too! Thanks for the support. (PS I've already reformatted that drive to ext4.)

Re: File size

2023-08-23 Thread FeepingCreature via Digitalmars-d-learn
On Tuesday, 22 August 2023 at 16:22:52 UTC, harakim wrote: On Monday, 21 August 2023 at 11:05:36 UTC, FeepingCreature wrote: Can you print some of the wrong sizes? D's DirEntry iteration code just calls `FindFirstFileW`/`FindNextFileW`, so this *shouldn't* be a D-specific issue, and it should b

Re: File size

2023-08-22 Thread harakim via Digitalmars-d-learn
On Monday, 21 August 2023 at 11:05:36 UTC, FeepingCreature wrote: Can you print some of the wrong sizes? D's DirEntry iteration code just calls `FindFirstFileW`/`FindNextFileW`, so this *shouldn't* be a D-specific issue, and it should be possible to reproduce this in C. Thanks for the suggest

Re: File size

2023-08-21 Thread harakim via Digitalmars-d-learn
On Monday, 21 August 2023 at 11:05:36 UTC, FeepingCreature wrote: Can you print some of the wrong sizes? D's DirEntry iteration code just calls `FindFirstFileW`/`FindNextFileW`, so this *shouldn't* be a D-specific issue, and it should be possible to reproduce this in C. Yes! I will get that i

Re: File size

2023-08-21 Thread FeepingCreature via Digitalmars-d-learn
On Monday, 21 August 2023 at 07:52:28 UTC, harakim wrote: I have been doing some backups and I wrote a utility that determines if files are an exact match. As a shortcut, I check the file size. So far so good on this with millions of files until I found something odd: getSize() and DirEntry&#

File size

2023-08-21 Thread harakim via Digitalmars-d-learn
I have been doing some backups and I wrote a utility that determines if files are an exact match. As a shortcut, I check the file size. So far so good on this with millions of files until I found something odd: getSize() and DirEntry's .size are producing different values. This i

Re: Why is the compiled file size so huge?

2022-05-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/27/22 9:40 AM, Alexander Zhirov wrote: I'm trying to compile a file that weighs 3 kilobytes. I'm also linking a self-written dynamic library. I don't understand why the resulting executable file is so huge? After all, all libraries are present: ```sh -rwxr-xr-x 1 root root 6.3M May 27 13:

Re: Why is the compiled file size so huge?

2022-05-28 Thread zjh via Digitalmars-d-learn
On Friday, 27 May 2022 at 13:40:25 UTC, Alexander Zhirov wrote: I'm trying to compile a file that weighs 3 kilobytes. I'm also linking a self-written dynamic library. I don't understand why the resulting executable file is so huge? I just switched from `32-bit` to 64 bit, but the '64' bit pro

Re: Why is the compiled file size so huge?

2022-05-28 Thread user1234 via Digitalmars-d-learn
On Friday, 27 May 2022 at 13:40:25 UTC, Alexander Zhirov wrote: I'm trying to compile a file that weighs 3 kilobytes. I'm also linking a self-written dynamic library. I don't understand why the resulting executable file is so huge? After all, all libraries are present: I'd take a look with

Re: Why is the compiled file size so huge?

2022-05-28 Thread rempas via Digitalmars-d-learn
On Friday, 27 May 2022 at 13:40:25 UTC, Alexander Zhirov wrote: I'm trying to compile a file that weighs 3 kilobytes. I'm also linking a self-written dynamic library. I don't understand why the resulting executable file is so huge? After all, all libraries are present: [...] I did a similar

Why is the compiled file size so huge?

2022-05-27 Thread Alexander Zhirov via Digitalmars-d-learn
I'm trying to compile a file that weighs 3 kilobytes. I'm also linking a self-written dynamic library. I don't understand why the resulting executable file is so huge? After all, all libraries are present: ```sh -rwxr-xr-x 1 root root 6.3M May 27 13:39 app -rw-r--r-- 1 root root 2.9K May 27 12

Re: whats happening to my binary file size?

2014-08-27 Thread Mike Parker via Digitalmars-d-learn
On 8/28/2014 1:24 AM, Israel wrote: On Wednesday, 27 August 2014 at 09:23:57 UTC, Marc Schütz wrote: But, how would i configure dub and my dub.json to automatically use those LDC switches if it isnt automatically built into dub? You can pass compiler-specific flags by adding a "dflags" entry

Re: whats happening to my binary file size?

2014-08-27 Thread via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 16:24:23 UTC, Israel wrote: On Wednesday, 27 August 2014 at 09:23:57 UTC, Marc Schütz wrote: You could try using LDC. The latest version 0.14.0 already uses --gc-sections automatically. (But it is based on DMD 2.065, so you cannot (yet) use all of the newest feat

Re: whats happening to my binary file size?

2014-08-27 Thread Israel via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 09:23:57 UTC, Marc Schütz wrote: On Wednesday, 27 August 2014 at 02:16:37 UTC, Israel wrote: On Wednesday, 27 August 2014 at 01:41:51 UTC, Messenger wrote: Conjecture: your binary has its imports statically linked in, and your linker doesn't remove unused code (-

Re: whats happening to my binary file size?

2014-08-27 Thread via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 02:16:37 UTC, Israel wrote: On Wednesday, 27 August 2014 at 01:41:51 UTC, Messenger wrote: Conjecture: your binary has its imports statically linked in, and your linker doesn't remove unused code (--gc-sections). https://issues.dlang.org/show_bug.cgi?id=879 I

Re: whats happening to my binary file size?

2014-08-26 Thread Israel via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 01:41:51 UTC, Messenger wrote: On Tuesday, 26 August 2014 at 23:36:44 UTC, Israel wrote: I wasnt paying any attention to the file size of my binaries when i started using D. My first program is simple and compiles at 486kb, which honestly, is kind of absurd

Re: whats happening to my binary file size?

2014-08-26 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 23:36:44 UTC, Israel wrote: I wasnt paying any attention to the file size of my binaries when i started using D. My first program is simple and compiles at 486kb, which honestly, is kind of absurd but anyways, after i start adding other imports it ran all the

Re: whats happening to my binary file size?

2014-08-26 Thread Messenger via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 23:36:44 UTC, Israel wrote: I wasnt paying any attention to the file size of my binaries when i started using D. My first program is simple and compiles at 486kb, which honestly, is kind of absurd but anyways, after i start adding other imports it ran all the

whats happening to my binary file size?

2014-08-26 Thread Israel via Digitalmars-d-learn
I wasnt paying any attention to the file size of my binaries when i started using D. My first program is simple and compiles at 486kb, which honestly, is kind of absurd but anyways, after i start adding other imports it ran all the way up to 4.5mb. what i want to ask is, what exactly is

Re: optlink options to reduce file size?

2011-07-27 Thread simendsjo
On 28.07.2011 00:30, Dmitry Olshansky wrote: On 28.07.2011 2:03, simendsjo wrote: On 27.07.2011 23:00, Dmitry Olshansky wrote: On 27.07.2011 21:16, simendsjo wrote: On 27.07.2011 15:45, Dmitry Olshansky wrote: On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application ta

Re: optlink options to reduce file size?

2011-07-27 Thread Dmitry Olshansky
On 28.07.2011 2:03, simendsjo wrote: On 27.07.2011 23:00, Dmitry Olshansky wrote: On 27.07.2011 21:16, simendsjo wrote: On 27.07.2011 15:45, Dmitry Olshansky wrote: On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this t

Re: optlink options to reduce file size?

2011-07-27 Thread simendsjo
On 27.07.2011 23:00, Dmitry Olshansky wrote: On 27.07.2011 21:16, simendsjo wrote: On 27.07.2011 15:45, Dmitry Olshansky wrote: On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way

Re: optlink options to reduce file size?

2011-07-27 Thread Dmitry Olshansky
On 27.07.2011 21:16, simendsjo wrote: On 27.07.2011 15:45, Dmitry Olshansky wrote: On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables?

Re: optlink options to reduce file size?

2011-07-27 Thread Dmitry Olshansky
On 27.07.2011 23:35, simendsjo wrote: On 27.07.2011 20:59, q66 wrote: == Quote from Dmitry Olshansky (dmitry.o...@gmail.com)'s article On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there i

Re: optlink options to reduce file size?

2011-07-27 Thread simendsjo
On 27.07.2011 20:59, q66 wrote: == Quote from Dmitry Olshansky (dmitry.o...@gmail.com)'s article On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smalle

Re: optlink options to reduce file size?

2011-07-27 Thread q66
== Quote from Dmitry Olshansky (dmitry.o...@gmail.com)'s article > On 27.07.2011 15:21, simendsjo wrote: > > A simple hello world like dfl application takes 1.2mb. Upx does a > > great job packing this to 200k, but I wonder if there is a way to make > > optlink generate smaller executables? > > > >

Re: optlink options to reduce file size?

2011-07-27 Thread simendsjo
On 27.07.2011 13:42, Stephan wrote: On 27.07.2011 13:26, simendsjo wrote: On 27.07.2011 13:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables? I could

Re: optlink options to reduce file size?

2011-07-27 Thread simendsjo
On 27.07.2011 15:45, Dmitry Olshansky wrote: On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables? I couldn't find a way to get help on

Re: optlink options to reduce file size?

2011-07-27 Thread Dmitry Olshansky
On 27.07.2011 18:05, Andrej Mitrovic wrote: I've found it interesting how sometimes (not dfl-specific) the first compiled executable is over a meg in size, but as I add a couple of hunderd lines of code the executable size shrinks. I guess some kind of optimization takes place there.. LOL, it sh

Re: optlink options to reduce file size?

2011-07-27 Thread Andrej Mitrovic
I've found it interesting how sometimes (not dfl-specific) the first compiled executable is over a meg in size, but as I add a couple of hunderd lines of code the executable size shrinks. I guess some kind of optimization takes place there..

Re: optlink options to reduce file size?

2011-07-27 Thread Dmitry Olshansky
On 27.07.2011 15:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables? I couldn't find a way to get help on the numerous options in optlink, and the he

Re: optlink options to reduce file size?

2011-07-27 Thread Stephan
On 27.07.2011 13:26, simendsjo wrote: On 27.07.2011 13:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables? I couldn't find a way to get help on the num

Re: optlink options to reduce file size?

2011-07-27 Thread simendsjo
On 27.07.2011 13:21, simendsjo wrote: A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables? I couldn't find a way to get help on the numerous options in optlink, and the help

optlink options to reduce file size?

2011-07-27 Thread simendsjo
A simple hello world like dfl application takes 1.2mb. Upx does a great job packing this to 200k, but I wonder if there is a way to make optlink generate smaller executables? I couldn't find a way to get help on the numerous options in optlink, and the help page at digitalmars doesn't list the