LWN.net Logo

Real-life optimization work

Real-life optimization work

Posted Nov 5, 2005 3:11 UTC (Sat) by vonbrand (subscriber, #4458)
In reply to: Real-life optimization work by nix
Parent article: All hail the speed demons (O'Reillynet)

Sorry, but comparing the size of the binaries is useless. Use size(1) for that. Also, from what I understand, on SPARC 64-bit binaries are much larger due to larger constants (pointers, integers, ...) all over the place.

Besides, what is the point? To get anything running on an 8-bit machine was a challenge, lots of things you take for granted today weren't even the stuff of wet dreams then. You also have to remember that today the expensive part of the mix is people, not machine. Sure, one could develop mean and lean applications doing most of what today's software does. With enough care, you could even figure out how to include just the features people really use, and shave off quite a bit more. But the development would be a whole lot more expensive, just for letting a few MiB of RAM lay around unused for a change.


(Log in to post comments)

Real-life optimization work

Posted Nov 7, 2005 0:18 UTC (Mon) by nix (subscriber, #2304) [Link]

I size(1)d them, of course; I just didn't want to spray the result all over the comments page.

And, yes, I'd agree that normally shaving bytes off things isn't worth it: however, with that in mind I spent this weekend shaving a few bytes off one data structure in one program and reducing the number of instances of that data structure --- and reducing the program's peak memory consumption from many gigabytes to a few hundred Mb.

But microoptimizations without major results, or pervasive ones, are indeed generally not worth it.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds