Live data from Hacker News

3998-byte executable reduced to 45 bytes

muppetlabs.com

11–12 of 12 posts

Re: 3998-byte executable reduced to 45 bytes

#11
post #6

My problem with the article is that it's not really theoretically useful, it's just a case for one particular program. Writing large programs in C, I rarely see the need to optimise program size - I'm more interested in execution time. Even so, with thousands of lines of code, the executable is typically I think this article is slightly outdated as we don't run 64kb 8-bit machines anymore. My last comment is that you…

The end result is not useful, but I learned a lot of new things about C and processes along the way.

And I thought it was an inspiring exercise to go as far down to the metal as possible.

It does make me feel guilty when programming Ruby that I sometimes create an entire array object to compare two integers because it looks prettier, without any regard for performance. It feels so wasteful.

Re: 3998-byte executable reduced to 45 bytes

#12
post #9
post #6

My problem with the article is that it's not really theoretically useful, it's just a case for one particular program. Writing large programs in C, I rarely see the need to optimise program size - I'm more interested in execution time. Even so, with thousands of lines of code, the executable is typically I think this article is slightly outdated as we don't run 64kb 8-bit machines anymore. My last comment is that you…

This article is definitely not intended to teach you how to optimize your programs. That is, unless your usual programs are small enough to embed inside object file headers with the opcodes overlapping header field values. It's a clever hack that teaches you about how ELF works by forcing you to think carefully about every single byte in a customized ELF executable. I work frequently with object file formats (especia…

My usual programs are. In fact, you might have one of them on your computer right now... unless you've run a scan recently. ;)
Post reply on HN