Path: utzoo!utgpu!attcan!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.fortran Subject: Re: CDC FORTRAN trivia questions Keywords: arithmetic if logical Message-ID: <7706@boring.cwi.nl> Date: 5 Nov 88 22:53:53 GMT References: <1196@helios.ee.lbl.gov> <3616@s.cc.purdue.edu> <7523@ut-emx.UUCP> <3622@s.cc.purdue.edu> <7693@boring.cwi.nl> <3627@s.cc.purdue.edu> <16427@agate.BERKELEY.EDU> Organization: CWI, Amsterdam Lines: 14 In article <16427@agate.BERKELEY.EDU> forags@violet.berkeley.edu writes: > Right! The RUN compiler used a CXi Xk instruction (count all one-bits in Xi > and store the result in Xk, so anything but 60 zero bits was true). (On a > 6000-series machine this took an obscene number of minor cycles (68 on a > 6400), which made logical variables rather slow to evaluate...) > This explains it. I would never have thought that a compiler writer would use that instruction for logicals. Interestingly, on many Cybers the sequence I gave (OR(NOT(L)+0,L).GE.0) is faster than CXi Xk followed by a PL, and does the same! And if you follow comp.arch you know why this instruction was there. -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax