Bug 11267 – Resulting executable sizes varies a lot

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2013-10-15T00:40:00Z
Last change time
2013-10-18T00:04:47Z
Assigned to
nobody
Creator
g.sayol

Comments

Comment #0 by g.sayol — 2013-10-15T00:40:09Z
On Debian stable (7.1), a simple "Hello World" program dramatically varies the executable size depending on compiler version and linking type: DMD v2.063.2 (32-bit) static: 672 KB shared: 91 KB DMD v2.064 (32-bit) static: 1164 KB shared: 42 KB DMD v2.063.2 (64-bit) static: 789 KB shared: 111 KB DMD v2.064 (64-bit) static: 1348 KB shared: 51 KB
Comment #1 by bugzilla — 2013-10-15T01:17:36Z
On Windows 32 bit, I get about a 120K increase in size, and this is pretty much entirely due to the increase in size of the tables in std.internal.uni_tab.d (from looking at the .map file).
Comment #2 by bugzilla — 2013-10-15T01:34:28Z
Jordi, did you run strip on those executables?
Comment #3 by g.sayol — 2013-10-15T02:28:35Z
(In reply to comment #2) > Jordi, did you run strip on those executables? No. Here I attach the results of "$ strip --strip-unneeded hello.d": DMD v2.063.2 (32-bit) stripped static: 672 KB -> 484 KB shared: 91 KB -> 64 KB DMD v2.064 (32-bit) static: 1164 KB -> 795 KB shared: 42 KB -> 28 KB DMD v2.063.2 (64-bit) static: 789 KB -> 567 KB shared: 111 KB -> 81 KB DMD v2.064 (64-bit) static: 1348 KB -> 921 KB shared: 51 KB -> 35 KB
Comment #4 by g.sayol — 2013-10-18T00:02:57Z
DMD v2.064 beta2 fix it: (32-bit) static: 481 KB shared: 41 KB (64-bit) static: 590 KB shared: 48 KB