Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: volatile: a summary Message-ID: <12057@mimsy.UUCP> Date: 21 Jun 88 02:10:19 GMT References: <11837@mimsy.UUCP> <3811@pasteur.Berkeley.Edu> <580@wsccs.UUCP> <761@garth.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 32 In article <761@garth.UUCP> smryan@garth.UUCP (Steven Ryan) writes: >(Is `perfect enough' like `barely pregnant?') Use `good enough' if you prefer; it is a better phrasing, anyway. >... Obviously one could write a total recursive >predicate that partitions what can be handled by a `perfect enough' compiler >if conservative erring is accepted. What about what cannot be handled? Is it >deemed not worthy of optimisation? Yes. The real idea is that, if the compilers get it right more often than the programmers, we (Robert Firth and I) would rather have the compilers do it. >Property X (X=volatile or anything else) cannot be determined for these >outcasts. Either they are not optimised or a `perfect enough' compiler >must be given hints .... The same logic can be used to show that whatever optimisation algorithms you use will miss a few `outcasts'. We already accept this. In extreme cases some of us resort to assembly language programming. Others add more algorithms---more hints, as it were. After a while the hints become more expensive than the lost optimisations. (I happen to think that point is not yet reached until *after* the volatile keyword has been added, but that the point is a mvoing target which will eventually move to before that point. Already `register' is fast becoming a noise word.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris