Deutsch English Français Italiano |
<uu39sg$3fb7n$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Terje Mathisen <terje.mathisen@tmsw.no> Newsgroups: comp.arch Subject: Re: Microarch Club Date: Thu, 28 Mar 2024 09:31:11 +0100 Organization: A noiseless patient Spider Lines: 55 Message-ID: <uu39sg$3fb7n$1@dont-email.me> References: <uti24p$28fg$1@nnrp.usenet.blueworldhosting.com> <utsrft$1b76a$1@dont-email.me> <80b47109a4c8c658ca495b97b9b10a54@www.novabbs.org> <uttfk3$1j3o3$1@dont-email.me> <c3c8546c4792f1aadff23fd25ef8113b@www.novabbs.org> <utvggu$2cgkl$1@dont-email.me> <20240327012715.0000125c@yahoo.com> <uu1op0$30i4b$1@dont-email.me> <c7065593299c0defd89eaac999e79bbb@www.novabbs.org> <Az0NN.724623$xHn7.37631@fx14.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 28 Mar 2024 08:31:12 +0100 (CET) Injection-Info: dont-email.me; posting-host="e729d923a516023ee51249bcca99f97d"; logging-data="3648759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/stoWszxzahYOUUAUNCxq98LEMN+nAQwkI1z/EA8YExw==" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.1 Cancel-Lock: sha1:qUsJthcDOaI/jlPdGgGXglPtA88= In-Reply-To: <Az0NN.724623$xHn7.37631@fx14.iad> Bytes: 3475 Scott Lurndal wrote: > mitchalsup@aol.com (MitchAlsup1) writes: >> BGB wrote: >> >>> On 3/26/2024 5:27 PM, Michael S wrote: >>>> >>>> >>>> For slightly less then 20 years ARM managed OK without integer divide. >>>> Then in 2004 they added integer divide instruction in ARMv7 (including >>>> ARMv7-M variant intended for small microcontroller cores like >>>> Cortex-M3) and for the following 20 years instead of merely OK they are >>>> doing great :-) >>>> >> >>> OK. >> >> The point is they are doing better now after adding IDIV and FDIV. >> >>> I think both modern ARM and AMD Zen went over to "actually fast" integer >>> divide. >> >>> I think for a long time, the de-facto integer divide was ~ 36-40 cycles >>> for 32-bit, and 68-72 cycles for 64-bit. This is also on-par with what I >>> can get from a shift-add unit. >> >> While those numbers are acceptable for shift-subtract division (including >> SRT variants). >> >> What I don't get is the reluctance for using the FP multiplier as a fast >> divisor (IBM 360/91). AMD Opteron used this means to achieve 17-cycle >> FDIS and 22-cycle SQRT in 1998. Why should IDIV not be under 20-cycles ?? >> and with special casing of leading 1s and 0s average around 10-cycles ??? > > Empirically, the ARM CortexM7 udiv instruction requires 3+[s/2] cycles > (where s is the number of significant digits in the quotient). > > https://www.quinapalus.com/cm7cycles.html That looks a lot like an SRT divisor with early out? Having variable timing DIV means that any crypto operating (including hashes?) where you use modulo operations, said modulus _must_ be a known constant, otherwise information about will leak from the timings, right? > >> >> I submit that at 10-cycles for average latency, the need to invent screwy >> forms of even faster division fall by the wayside {accurate or not}. I agree. Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"