4 ms·
Not only that, but LD_PRELOAD and the ability to override symbols is a very valuable debugging tool. It also has value in other areas. For example, it is possi
by api 14y ago
Not only that, but LD_PRELOAD and the ability to override symbols is a very valuable debugging tool.
It also has value in other areas. For example, it is possible to make any binary -- even an entire virtual machine -- send all network traffic through SOCKS by wrapping it in a socksify library. You can't do that on Windows or (to my knowledge) OSX.
Part of the strength of Linux is how unbelievably hackable it is. I don't see the point in sacrificing this flexibility for a tiny microoptimization. And it's very tiny... that code has no branches and is just a couple of MOVs, so it's just going to get pipelined. It would only be worth it if it involved a bunch of extra conditional branching. Removing a few MOVs per function call is going to do nothing. It might literally do nothing, given that it might be buried beneath the waves of branch prediction failure overhead, cache misalignment overhead, etc.
Linux performance is not a problem at the low level. Linux performs very, very well. Its disk and memory allocation performance is noticeably superior to any other OS on the same hardware, in my experience.
The problem with Linux is usability and cruft.
- saurik 14y agoYou can pull that off on either Windows or OS X, it just takes a little more work. On Mac OS X there is even a supported simplerish feature for it called "interpose".