Hi Jerry!
12 Sep 97 23:16, Jerry Coffin wrote to Roger Scudder:
JC> Yes, though in honesty this is far less common. Typical examples would
JC> be C interpreters and P-code compilers. I don't know of any compilers
JC> that actually directly find common sections of code and put them into
JC> functions.
A related optimization could be done at (pre)link-time. If the linker
compared compiled functions on a byte-by-byte basis and removed dupes, it
could reduce code size dramatically in some cases. E.g. all instances of a
template container class handling pointers to generic objects could be
reduced to a single instance handling all types.
I don't known if any linker does that sort of optimization, but it could be
interesting to hear if anyone did.
Happy hacking,
Martin
---
---------------
* Origin: Jydebr‘ttet. 00:00-24:00. 87390611! Martin M. Pedersen (2:238/45)
|