home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11778 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  2.1 KB

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