Re: Win32Lib overhead

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks for the heads up. I forgot about UPX, its been a while since I've had
to compile C code, I guess Euphoria's been distracting me from it
recently... :)

~Greg

----- Original Message -----
From: "Robert Craig" <rds at RapidEuphoria.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Win32Lib overhead


>
> Greg writes:
> > If I write a program using Win32Lib, then translate and compile it,
> > will there be an over head from all the declarations and
> > routines in win32lib.ew?
>
> Both the translator and the binder strip out all unnecessary code.
> For example, when I bind your textview program,
> it says:
>       deleted 2154 of 3816 constants
>       deleted 382 of 659 routines
> That still leaves a fair bit of necessary infra-structure for Win32Lib.
>
> > I'm trying to make my programs extremely portable, and some
> > of them come out to be in the range of 200K for faily simple apps.
>
> Using your textview as an example,
>    bound .exe: 182,215
>    translated .exe: 642,560
>    translated and UPX'd .exe: 162,304
>
> In comparison, if you compile a trivial console app:
>    main()
>    {
>        printf("Hello World!\n");
>    }
> with Borland C++ for Windows, you'll get a 52K .exe file.
>
> The binder combines exw.exe, which is already compressed with UPX,
> with all your Euphoria source code in compact form -
> comments and whitespace stripped, variables shrunk to one or two bytes
etc.
> This gives you a very compact .exe.
>
> With the translator, your program is converted to C and then
> to machine language. This is not very compact, but UPX
> will shrink it considerably. Translated code is faster, but if
> your program is heavy on GUI, and light on calculation, it might
> not matter.
>
> > I guess what I'm really asking is "Is Win32Lib or direct API
> > coding better?"
>
> Win32Lib is a lot easier. Others (Euman?) can comment better
> on the trade-offs.
>
> By the way, if you see a line at the end of Win32Lib.ew
> that is just two dashes: -- (and no new-line character),
> you will need to remove it before binding with 2.3. This problem
> has been fixed in the upcoming 2.4 binder.
>
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu