Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!husc6!endor!singer From: singer@endor.UUCP Newsgroups: comp.sys.mac Subject: Re: TML vs LSP Message-ID: <1167@husc6.UUCP> Date: Tue, 3-Feb-87 16:02:05 EST Article-I.D.: husc6.1167 Posted: Tue Feb 3 16:02:05 1987 Date-Received: Wed, 4-Feb-87 07:18:16 EST References: <2172@batcomputer.tn.cornell.edu> <536@csun.UUCP> Sender: news@husc6.UUCP Reply-To: singer@endor.UUCP Organization: THINK Technologies, Inc. Lines: 27 The generated-code quality of LSP is, on the whole, very similar to that of TML Pascal. Both are single-pass compilers which are incapable of performing the kinds of optimizations possible in MPW Pascal (e.g. assigning local variables to registers). However, I can think of one area in which LSP would be (significantly) slower than TML: SET OF integer-subrange operations. One of the design goals of LSP (and one that I sometimes regret) was the need to retain full compatibility with the Macintosh Pascal interpreter. In this case, the interpreter provided for SET OF INTEGER as the largest set type. Operations on sets which may contain negative elements are cumbersome, since the requirement of ToolBox compatibility constrains the choice of representation. Furthermore, because the size of intermediate values can be large (up to 8K!) they are allocated from the heap (typically a slow operation). Sets of base-type other than integer or integer subrange are *much* more efficient. My guess is that the program that you are benchmarking uses SETs of integer subranges, and that you have struck one of the few areas in which compatibility with Macintosh Pascal has cost us some performance (text I/O is another). It is unfortunate that Lightspeed Pascal's performance is inferior in this case, but this is not indicative of its performance on typical programs. John McEnerney THINK Technologies, Inc.