• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Size Of Win64 Visual Studio Executables

Started by Frederick J. Harris, October 07, 2010, 09:16:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frederick J. Harris

Hi Patrice!

   I guess you've been at the VC++ 64 bit a while now.  I'm curious as to what you are seeing in terms of exe sizes compared to comparable PowerBASIC 32 bit exes.  I know you've been converting some of your PB code to C++ so I thought I'd ask.  I don't have any 64 bit OS yet, but I'm thinking of buying myself a new laptop with 64 bit OS.  While the organization I work for will be going to 32 bit Win 7, I expect in a few years the IT dept will make the jump to 64 bit, and I'd like to at least experiment with it a bit. 

Patrice Terrier

#1
Frederick

The resulting X64 EXE size can vary between x 1.15 and x 1.8 among Win32.

For this simple console source code:

#include <stdio.h>
#include <windows.h>  // Search along the path.

char* FullExeName() {
static char fullexename[MAX_PATH];
static int Done;
if (Done == 0) { Done = GetModuleFileNameA(0, fullexename, sizeof(fullexename)); }
   return fullexename;
}

char* test() {
char szText[260] = "bonjour";
return szText;
}

void main(void)
{
printf ("Hello world\n");
printf (test());
printf ("\n");
printf (FullExeName());
printf ("\n");
printf (FullExeName());
}


The Win32 EXE size is 6656 bytes, and 7680 bytes for X64.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com