"Mattias Sjögren" <ma********************@mvps.org> wrote
When I compare a C# and nearly identical VB.NET project, the C# generated
assembly has almost twice the size of the VB assembly. IL code is nearly
identical, but the C# generated assembly contain lots of 00 00 00. What's
that? Or better: How can I stop that?
Which compiler options are you using? Are you looking at release or
debug builds? Strong named or not? Do the assemblies contain any
resources?
VS.NET 2003, FrameworkVersion=v1.1.4322
C# class library, default settings, Release build: 16,0 KB (16.384 bytes)
VB.NET class library, default settings, Release build: 5,00 KB (5.120 bytes)
I'm no VB programmer, but the default settings should be similar. No res or
sn.
Oh wait, manifest says .file alignment 512 != 4096.
Bingo, found it. Setting 512 in CS yields: 3,50 KB (3.584 bytes)
Does that have any performance impact?
Jens.
--
http://ManagedXLL.net/ |
http://jens-thiel.de/ |
http://QuantLib.net/
Replace MSDN with my first name when replying to my email address!