home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mips!pacbell.com!tandem!zorch!amiga0!mykes
- From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: CPU cycles
- Message-ID: <mykes.0ao0@amiga0.SF-Bay.ORG>
- Date: 29 Jul 92 14:41:50 GMT
- References: <jbickers.0bpc@templar.actrix.gen.nz> <1992Jul24.140511.2717@csdvax.csd.unsw.edu.au>
- Organization: Amiga makes it possible
- Lines: 31
- X-NewsSoftware: GRn 1.16f (beta) by Mike Schwartz & Michael B. Smith
-
- In article <1992Jul24.140511.2717@csdvax.csd.unsw.edu.au> 89u7491@csdvax.csd.unsw.edu.au writes:
- > In article <jbickers.0bpc@templar.actrix.gen.nz>, jbickers@templar.actrix.gen.nz (John Bickers) writes:
- > >
- > > My routine takes around 2920 cycles, but it's only happening about
- > > 850 times a second. Multiplying the two tells me there's roughly
- > > 2,500,000 cycles a second, when I expected ten times that (25MHz).
- > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- > You have forgotten memory access times. Time taken to get/put data from memory
- > is considerably longer than a CPU cycle, this will raise the expected numer of
- > Cycles per instruction. Secondly the 68030 instruction cycle may not be running
- > at 25Mhz, it may be some derivative of this? (I'm not sure here). Anyway isn't
- > the 68030 pipelined, in which case all instructions should take 1 pipeline
- > cycle once the pipe is full.
- >
-
- I remember reading magazine articles about the 020 when it first came out. Seems
- even Motorola can't tell you how fast your code is going to run :) At least that
- was the case at the time... Some instructions on the 030 take ZERO cycles when
- used in the right sequence, so counting clock cycles is almost useless. However,
- if you compare an algorithm written two ways and count the clock cycles for each,
- the one with the fewer cycles will run faster :)
-
- > Cheers
- > -Trevor
-
- --
- Amiga programmer of: GRn, MailMinder, Budokan, Beyond Dark Castle, Dark Castle
- Sega Genesis programmer of: Dick Tracy and Marble Madness.
- Mike Schwartz (ames!zorch!amiga0!mykes or mykes@amiga0.sf-bay.org)
- 1124 Fremont Ave.
- Los Altos, CA 94024
-