Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scee.yaroze.beginners Subject: Re: Plotting 2D Boxes in a 3D World (+ faster code hint!) Date: Fri, 15 May 1998 13:07:21 +0100 Organization: Bacardi Ferrari V12 Lines: 25 Message-ID: <355C2FF9.26F4@manc.u-net.com> References: <355a3dc2.2999054@news.playstation.co.uk> <355A67EA.137C@mdx.ac.uk> <355B0CD4.2A85@writeme.com> <355B86AD.3C0@manc.u-net.com> <6jg24u$f4o3@chuka.playstation.co.uk> NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) Toby Sargeant wrote: > on the R3000, shifts are still faster than multiplies, although the > processor isn't sitting idle during that time, so if you can use the > delay slots, then you don't lose out. > the fact is though, that all optimising compilers will take constant > multiplies and turn them into shifts if it's faster to do it that way. Have I been shot down? Are you saying that under optimisation all compilers will turn x*320 into x<<8+x<<6? What about 336? Would it do x<<8+x<<6+x<<4 or leave it as MUL? Will they also turn x+=1 into x++? Will they know if x+=2 is faster than x++;x++;? Will Dangermouse ever be captured by Baron Greenback? I guess compiler engineering has come a long way since the early days. I remember when it were all fields, and you got free milk at school etc. etc. Now I REALLY need to do some benchmarks on this! (Compiler engineering that is, not urban redevelopment) Cheers, Jim -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj -----------------------------------------