Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1005329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:16:40+00:00 2026-05-16T08:16:40+00:00

My executable was 364KB in size. It did not use a Vector2D class so

  • 0

My executable was 364KB in size. It did not use a Vector2D class so I implemented one with overloaded operators.

I changed most of my code from

point.x = point2.x;
point.y = point2.y;

to

point = point2;

This resulted in removing nearly 1/3 of my lines of code and yet my exe is still 364KB. What exactly causes it to grow in size?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:16:41+00:00Added an answer on May 16, 2026 at 8:16 am

    What makes EXE’s grow in size?

    External libraries, especially static libraries and debugging information, total size of your code, runtime library. More code, more libraries == larger exe.

    To reduce size of exe, you need to process exe with gnu strip utility, get rid of all static libraries, get rid of C/C++ runtime libraries, disable all runtime checks and turn on compiler size optimizations. Working without CRT is a pain, but it is possible. Also there is a wcrt (alternative C runtime) library created for making small applications (by the way, it hasn’t been updated/maintained during last 5 years).

    The smallest exe that I was able create with msvc compiler is somewhere around 16 kilobytes. This was a windows application that displayed single window and required msvcrt.dll to run. I’ve modified it a bit, and turned it into practical joke that wipes out picture on monitor.

    For impressive exe size reduction techniques, you may want to look at .kkrieger. It is a 3D first person shooter, 96 kilobytes total. The game has a large and detailed level, supports shaders, real-time shadows, etc. I.e. comparable with Saurbraten (see screenshots). The smallest working windows application (3d demo with music) I ever encountered was 4 kilobytes big, and used compression techniques and (probably) undocumented features (i.e. the fact that *.com executbale could unpack and launch win32 exe on windows xp)..

    In most cases, size of *.exe shouldn’t really bother you (I haven’t seen a diskette for a few years), as long as it is reasonable (below 100 megabytes). For example of “unreasonable” file size see debug build of Qt 4 for mingw.

    This resulted in removing nearly 1/3 of my lines of code and yet my exe is still 364KB.

    Most likely it is caused by external libraries used by compiler, runtime checks, etc.
    Also, this is an assignment operation. If you aren’t using custom types for x (with copy constructor), “copy” operation is very likely to result in small number of operations – i.e. removing 1/3 of lines doesn’t guarantee that your code will be 1/3 shorter.

    If you want to see how much impact your modification made, you could “ask” compiler to produce asm listing for both versions of the program then compare results (manually or with diff). Or you could disasm/compare both versions of executable. BUt I’m certain that using GNU strip or removing extra libraries will have more effect than removing assignment operators.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should reduce the executable size quite a bit in some of my very
I want to ignore executable files that do not have an extension For example:
When dumping an executable file, I only want the code segment to be printed
i have one executable and one shared library in my project. The shared library
I create a executable jar with eclips indigo and use a bat file to
Synopsis : When calling an executable that links to shared libraries from Java code
I have an executable embedded into my app resources. ATM I use assembly reflection
An executable problem like exe does not work on Linux (without wine). When compiling
I am running the executable application (a WinForms one) and I have faced the
I am running an executable in linux (c++ code). I want to calculate 'average'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.