8 ms·
One thing to remember, is that almost all of the unix utility programs were developed for computers that had FAR less horsepower than even a modest desktop PC o
by ams6110 16y ago
One thing to remember, is that almost all of the unix utility programs were developed for computers that had FAR less horsepower than even a modest desktop PC of today. In the early days, literally every byte of RAM was precious as was every CPU instruction. So in that sense, necessity was the mother of invention, and developers were accustomed to working with that mindset.
- jacquesm 16y ago> every byte of RAM was precious as was every CPU instruction. What I wouldn't give to infuse that sense in to present day programmers. (writing this on a box with 12G ram, pretty much maxed out).
- uxp 16y agoMost of UNIX's utilities were written with high regard for their memory use. When GNU decided to clone them all, they actually outlined that their developers were forbidden to even review UNIX sourcecode. Convention stated that they all try to write the programs with speed in mind, and now we have these discussions. http://www.gnu.org/prep/standards/html_node/Reading-Non_002dFree-Code.html http://www.gnu.org/prep/standards/html_node/Reading-Non_002d...
- jacquesm 16y agoI don't think you should optimize for space or speed at each others expense without figuring out if the trade-off is worth it. Space and speed will always be conflicting goals during optimizations (unless you're very lucky), and for practical use the sweet spot is usually somewhere in between the two extremes. To blindly optimize for speed will result in very wasteful behaviour when it comes to memory usage, to blindly optimize for space will result in terrible performance. Smart software realizes when the space is available and free for the taking and will use it to find an increase in speed, it will also realize when space is at a premium and economize on it's usage. On another note, accessing all that memory costs cycles and is almost certainly going to trash your cache, chances are that if you manage to reduce your memory footprint eventually you'll find that instead of losing speed you're gaining speed. Open Office started up with a blank word processor document uses 83 Megs of RAM, something tells me that could be a whole lot less without sacrificing functionality or speed.
- uxp 16y agoI agree completely that one should not optimize for one area without taking in account the penalties incurred on the other areas. I hope I didn't give that impression. One of the more major reasons of GNU developing the habit of writing utilities that were significantly different in their implementation was to make sure no UNIX/BSD code could leak in, since at the time the project was underway, BSD was stuck in that whole USL vs BSDi suit, and BSD's code was tentatively deemed 'non-free'. One also needs to account for the time period these utilities were written, and for what computer system they were originally written for. Both memory and speed were expensive. Writing these utilities probably required much more thought to the smaller details than one would think about today when writing say a word processor, even though one could benefit by doing so.
- adbge 16y ago> writing this on a box with 12G ram, pretty much maxed out Serious question: what are you using 12G of RAM on? My workstation is pretty modest (core 2 duo, 4G RAM) and I'm rarely able to utilize more than 1G.
- jacquesm 16y agoIDE, OpenOffice, Browser, email client, shell and window manager. That's it. The big ones are the first three and X windows.
- dagw 16y agoI run exactly those apps on a computer with 2 gigs of RAM and never really had any problems.
- jacquesm 16y agoWe are probably doing different things with our applications.
- dagw 16y agoOut of curiosity, how do you manage to make an IDE, Open Office and a browser eat through 12 gigs of RAM?
- jacquesm 16y agoIt's really not that hard. One fair sized project and a bunch of browsers with tabs. It surprises me very much how much RAM that gobbles up. I'm not even testing stuff with VMs right now, as soon as I get in to that I have to shut down the IDE at a minimum or I'll hit the swap.
- Zak 16y agoThe stable version of Chrome leaks memory like crazy on Linux. I was frequently using over 1gb according to about:memory and have seen it use up to 3gb. 6.0.495.0 dev seems to be better about it.