Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus Newsgroups: comp.arch Subject: more about division Message-ID: <628@quintus.UUCP> Date: 4 Nov 88 12:18:21 GMT Sender: news@quintus.UUCP Reply-To: ok@quintus () Organization: Quintus Computer Systems, Inc. Lines: 23 Just another little data point on the RISC/division/COBOL topic. I mentioned that one of the things you need for COBOL is fast text->binary and fast binary->text conversion, and hinted that I have some ideas about how to do them fast without multiply/divide/remainder. (No big deal; all it takes is tables and a twisted mind.) I haven't done the 32-bit version yet, but I have done a 20-bit one (generates 7 digits). Fast Slow Slow/Fast MC68020 15.6 76 4.9 Whizzbang 3.4 51 15.2 (times in microseconds per conversion) The Whizzbang is a RISC which has no hardware support for division, not even a divide step. The Fast and Slow times include subroutine call, but the Fast version is small enough to do in-line. It uses bit-field extraction, adds, word loads, and byte stores. What's really interesting about the example is that the Slow version takes 41% of the total program time on the 68020, 44% on the Whizzbang. The rest of the time was going in I/O. So although the Whizzbang is about 4.6 times as fast on RISCy instructions, it ended up running the program only 1.6 times faster. Oddly enough, C compilation times on the two machines also exhibit about a 1.6 ratio. Perhaps the next generation of workstations should have more effort put into speeding up I/O than into speeding up the CPU?