Path: chuka.playstation.co.uk!news From: "John \( QuietBloke \)" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Daft Question [long] Date: Sat, 1 Sep 2001 23:52:59 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 36 Message-ID: <9mrotl$mfo3@www.netyaroze-europe.com> References: <9loc6a$p3k2@www.netyaroze-europe.com> <9loeu8$p3k3@www.netyaroze-europe.com> <01c1297e$8cb6e8a0$LocalHost@pal-s-omnibook> <9lrqqf$3j63@www.netyaroze-europe.com> <01c129ca$a5a6f700$d81fe4d5@pal-s-omnibook> <9m1d9c$b2i7@www.netyaroze-europe.com> <01c12ceb$fba64880$9709e4d5@pal-s-omnibook> <9m9c88$ioj5@www.netyaroze-europe.com> <01c12edc$cc2bf440$991fe4d5@pal-s-omnibook> <9me1g1$1sb13@www.netyaroze-europe.com> <9meajl$1sb17@www.netyaroze-europe.com> <01c13018$85386ae0$122e1bd4@pal-s-omnibook> <9mjelr$dra1@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-129-64.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 On a similar note... if a mul can can up to 32 cycles then presumably something like x=y*6 would be faster if coded as x=y+y+y<<2 or maybe even x=y<<2+y<<1 would be faster still. Would a compiler do this on max optimization too ? "Jon Prestidge (Jon@surfed.to)" wrote in message news:9mjelr$dra1@www.netyaroze-europe.com... > It probably is if you've seen it I was just guessing... I never noticed a > big difference in clock cycle useage with other processors between different > operations-- mind you I've never looked too closely, and they weren't risc. > I certainly never knew there was a co processor like Alex says so ignore > most of what I said John > > > all arithmetic and logic > > operations take one cycle except for > > muls and divs which can take up to > > about 32 cycles. > > ... that's interesting....so 5+5+5+5+5+5 is qucker that 5*6 for example. > ....although I suppose it'd have to fether the instructions too so perhaps > not. I surprised that all the other instructions only take one cycle, I > guess that's risc. I was guessing something like a logical shift would take > about 4 cycles and divide would take about 6, how wrong I was--- well that's > opened my eyes, I'll beable to optimise my code better now, cheers. > > > Jon > > >