Tim Lovell-Smith wrote:
> I think I was wrong before. It isn't whether the linker is discarding
> functions or not - it's the code generation.
> 
> If I apply Wei's changes, AND am careful to have exactly the same C/C+
> + options enabled in my .exe project as my .lib project, I get exactly
> the same output .exe size.

I have been careful about holding everything constant *except* the most 
recent changes to iterhash.{cpp,h} - and observe the 2K change as reported.

I do NOT have identical options in my client project as the "cryptlite" 
static lib project - but they are quite close.  My client settings are 
what they are for historical reasons, and the "cryptlite" settings are 
duplicated so as to match the main Crypto++ settings.

They match in all the key particulars: multi-threaded NON-dll, linker 
code generation, omit frame pointers, enable intrinsics... the library 
uses -O2 and "any suitable" for inline expansion, favor size or speed is 
"neither".  My client uses -Ox and "only __inline" along with "favor 
small code".  And everyone is using -Gy for function-level linking.

> Also, telling the optimizer to optimize for speed, but favour size
> over speed (weird how you can do that) shaves off a few more KB.

I have been using this for quite some time... I guess I have assumed it 
means if multiple sequences could be emitted that are *close* in speed, 
use the smallest one (whereas if there is a larger expected difference 
in speed, use the faster version even if it is larger).

> Do these suggestions work for you?

See above comments... ;)  As a reality-check, what are actually using as 
a test bed for comparison?  Have you created your own version of the 
"cryptlite" static lib project in your Crypto++ working copy tree?

Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to