Newsgroups: comp.arch Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Semantics (was Software Distribution) Message-ID: <1988Oct9.012024.13303@utzoo.uucp> Organization: U of Toronto Zoology References: <13889@mimsy.UUCP> <2472@uhccux.uhcc.hawaii.edu> Date: Sun, 9 Oct 88 01:20:24 GMT In article <2472@uhccux.uhcc.hawaii.edu> lee@uhccux.uhcc.hawaii.edu (Greg Lee) writes: >Why would programs run any faster in a language with some undefined >semantics? To make a comparison, the same programs would have to >run in both versions of the language, and so could not make any >use of the semantics undefined in one of the versions... But the compiler doesn't necessarily know this, so it may have to take precautions that in fact are unnecessary but nevertheless slow down the code. Checking all pointer dereferences for NULL pointers, for example. The reason for leaving some semantics undefined is to avoid penalizing *all* programs for the sake of predictable behavior of the few that bend the rules. -- The meek can have the Earth; | Henry Spencer at U of Toronto Zoology the rest of us have other plans.|uunet!attcan!utzoo!henry henry@zoo.toronto.edu