From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3f9104dada53163 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: An interesting quote on Java and C++ Date: 1997/10/03 Message-ID: #1/1 X-Deja-AN: 277949058 References: <5ujjvq$t4s@drn.zippo.com> <34160feb.36797713@news.mindspring.com> <34218E68.63D5@gsg.eds.com> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1997-10-03T00:00:00+00:00 List-Id: In article dewar@merv.cs.nyu.edu (Robert Dewar) writes: > Of course if you find the non-binary modular stuff useful (I wonder how > much it is used outside ACVC tests), then no doubt you regard this as a > lucky mistake :-) One of the few places where it is useful is in random number generation, so I was one of the few who felt a need for it. However, there is a related "trick" that occaisionally is useful. Most hardware architectures support a word * word --> doubleword multiply, and a corresponding doubleword / word --> word instruction. Of course, these are not normally accesable from high-level languages without implementation dependent techniques. To pick a specific example, on the SPARC architecture, these instructions can follow one after the other, but accessing the register holding the high order bits is otherwise relatively slow. So, type Modular is mod M; --for some non-static binary M. X, Y, Z: Modular; ... X := Y * Z; -- can be done in very few clock cycles. This is of course most interesting in any application where you are interested in doing an integer FFT. Comes up a lot in signal processing. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...