Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. instruction executed per second by a microprocessor

instruction executed per second by a microprocessor

Scheduled Pinned Locked Moved Design and Architecture
tutorial
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    akhshay gandhi
    wrote on last edited by
    #1

    what program i need to write to find out number of instuctions executed per second by my processor. i thought of sending an interrupt after 1 second to an executing program(loop) which has counter, so by calculating difference between initial and final value of counter for that program(loop) we can find out instruction executed per second. but unfortunetly i don't know how to send timing interrupt. i need suggestions and guidance. thank you

    L 1 Reply Last reply
    0
    • A akhshay gandhi

      what program i need to write to find out number of instuctions executed per second by my processor. i thought of sending an interrupt after 1 second to an executing program(loop) which has counter, so by calculating difference between initial and final value of counter for that program(loop) we can find out instruction executed per second. but unfortunetly i don't know how to send timing interrupt. i need suggestions and guidance. thank you

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, the general question you ask needs an entire book to contain a general answer. Here are some facts: 1. you are in the wrong forum, it is not a software design/archiotecture issue, it depends foremost on the specific hardware. 2. Most microprocessors have some kind of NOP instruction, and can execute that in 1 cycle. So a 1GHz CPU (single core, no hyperthreading, ...) could execute 1 billion of those in one second. 3. More complex instructions may/will take longer; more so for CISC than for RISC. A divide instruction may take 35 cycles or so (or not be available at all). 4. Instruction scheduling nowadays complicates matter a lot: instructions don't always get executed at maximum theoretical speed due to scheduling constraints. 5. Memory bandwidth issues may slow things down (code cache misses, data cache misses, table walk delays) 6. Other system activity may reduce the throughput you are interested in: e.g. interrupts dealing with timer ticks, network traffic, ... :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups