Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang Subject: Re: Self-modifying code Message-ID: <3434@utzoo.UUCP> Date: Fri, 30-Dec-83 16:18:38 EST Article-I.D.: utzoo.3434 Posted: Fri Dec 30 16:18:38 1983 Date-Received: Fri, 30-Dec-83 16:18:38 EST References: <1096@mit-eddie.UUCP>, <319@decvax.UUCP> Organization: U of Toronto Zoology Lines: 14 One should distinguish between real self-modifying code and doing compilation at "run time". In the latter case, the code is not really modifying itself: new code (not modified old code) is being created and then run. This is a useful technique that is not used as much as it should be, although admittedly it's not a trivial thing to do and it obviously has severe portability problems. Another example of this sort of thing is that the RasterOp implementation for the Blit compiles optimal code for each request rather than trying to build in all the special cases ahead of time. The compilation takes something like 600 us worst case, so the overhead involved is small. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry