Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa Newsgroups: comp.unix.wizards Subject: Complaint about complex architectures Message-ID: <6787@brl-adm.ARPA> Date: Wed, 8-Apr-87 17:58:23 EST Article-I.D.: brl-adm.6787 Posted: Wed Apr 8 17:58:23 1987 Date-Received: Sat, 11-Apr-87 08:19:22 EST Sender: news@brl-adm.ARPA Lines: 52 Case in point: I just came up with a fast integer square-root routine for a local project (written in C, available on request). It has one multiply within the main loop. I also have a Unisys 1100 assembly version with NO multiplies in the loop, but I can't translate it to C because C doesn't have the double register operations, double precision shifts, and there is no easy way to code for the LSC (load shift and count) instruction other than yet another C loop. What, no `asm' directive? How about `sed'-ing the assembly output? I guess the point here is that it is possible for a dedicated assembly language programmer to effectively utilize these complex architectures to fly rings around anything written in a higher-level language. It is also possible for a really brilliantly written code generator to approach this kind of performance. Any attempt to simplify these architectures had better deliver blinding increases in hardware speed, or I'm still going to think it's a plot by the programmers and compiler writers to shirk their responsibilities... I'm not so sure. Remember the day Mike McAmis (heard from him lately?) was so proud he had occaision to use `Add Negative Thirds'? Remember the `convert Fieldata to (or from) Binary' using `Masked Load Uppers' with strings like `B0B0B0' and `888888'? Pretty arcane stuff. They just don't make them like that anymore. The machines were designed by engineers (remember, we dropped out of engineering and into computer science) who thought, `yeah, it's easy to do ANT, I'll just gate some of these carrys end around (note: U1108 is one's complement) instead of to the next bit' instead of finishing the *useful* instruction set. Therefore, we have `Test Greater' but not `Test Less'. Yeah, it was fun to look thru code, trying to slice off an instruction here or there, looking for faster instructions, etc. But those days are gone now, and it's conceptual clarity that counts. I'm sure you know all the arguments about simplified decoding that RISC is supposed to deliver. If the speed isn't delivered, at least the machine should be cheaper. It takes a Real Programmer to find occasion to use those Macho instructions. What makes you think some Wimpy compiler can do it? :-) umd5.UUCP <= {seismo!mimsy,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland UniSys 1100/92 umd2.BITNET "via HASP with RSCS" (Root Boy) Jim "Just Say Yes" Cottrell I'm mentally OVERDRAWN! What's that SIGNPOST up ahead? Where's ROD STERLING when you really need him?