Hacker News new | ask | show | jobs
by thehias 406 days ago
278kb? you are doing something very wrong, this should be possible in 10kb!
1 comments

The actual code in the repo definitely compiles to less than 10k. The rest is bloat from linking CRT statically.
Above, someone shared this tip to compile down to 23,552 bytes. Ref: https://news.ycombinator.com/item?id=43957984

Can you share how you can compile to only 10kb?

By "actual code" I meant the assembly that the application logic compiles down to, not the entire executable. But as far as the entire package goes, compiling it using clang with some flags I can get down to 19.5k without any effort. If I wanted to waste time on this, ripping out the CRT entirely and getting it to 16k would probably take less than an hour.