LWN.net Logo

All hail the speed demons (O'Reillynet)

All hail the speed demons (O'Reillynet)

Posted Nov 3, 2005 12:20 UTC (Thu) by ekj (guest, #1524)
In reply to: All hail the speed demons (O'Reillynet) by clugstj
Parent article: All hail the speed demons (O'Reillynet)

Not quite.

First you save disk-space since the binaries gets smaller.

Secondly your program starts quicker since there is less data to read (even if they're not loaded, they're still read, and even if they're not read, then there's an extra seek to skip them, and even then the VFS migth decide to do readahead anyway and thus physically read and transfer to RAM parts of the file which your application never ever touches or reads.

OK, so it's probably not major. But it wouldn't surprise me if the measured speedup was quite measurable.


(Log in to post comments)

All hail the speed demons (O'Reillynet)

Posted Nov 4, 2005 13:28 UTC (Fri) by nix (subscriber, #2304) [Link]

Sections which are not loaded are not read except if they happen to be in the same page as the loaded sections. You can ignore them except for their disk space consumption.

All hail the speed demons (O'Reillynet)

Posted Nov 7, 2005 15:35 UTC (Mon) by lypanov (subscriber, #8858) [Link]

umm you realize that disks are laid out in fairly large tracks
rather than 4kb sections right?

All hail the speed demons (O'Reillynet)

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

Yes. Even so, that large chunk containing a LOADed section would be read *whether or not the other parts of it happen to be LOADed or not*, so, again, the worst that .comment does is to reduce packing efficiency of LOADed sections. This is hardly a killer --- given that we have no effective tools to improve locality of reference in shared libraries anyway, we're wasting far more disk accesses on unnecessary paging due to poor packing of accessed functions.

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