DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Running time: operands in memory versus registers

  1. #1
    Join Date
    Apr 2008

    Running time: operands in memory versus registers

    Hi, I'm trying to compare the running time for operands in memory versus operands in registers. The specs are below:

    - number of instructions: n
    - 2-addresses per instruction
    - 10 times longer to access memory versus register
    - each instruction has at least 1 memory reference due to fetch operation in fetch/execute cycle

    This is my what I did---please correct me if I'm wrong:

    Instruction with operands in registers:
    10 units of measurement for memory reference in fetch operation + 1 unit for register 1 + 1 unit for register 2 = 12 units

    Instruction with operans in memory:
    10 units (fetch operation) + 10 units for memory address 1 + 10 units for memory address 2 = 30 units

    30/12 = 2.5

    2.5 times longer for operands in memory versus in registers


  2. #2
    Join Date
    Jul 2008
    I currently live in Bangalore,India
    In your spec, you have specified 2 addresses per instruction.

    When a fetch operation for the instruction happens, the entire instruction including the operands and opcode is got into the instruction register and then decoded and executed..

    so what do u mean when you say the operands can be in memory/registers?

Similar Threads

  1. query tuning
    By dhaya in forum Database
    Replies: 11
    Last Post: 08-25-2003, 05:24 PM
  2. Running global.asa and global.asax at same time
    By Jason Salas in forum ASP.NET
    Replies: 0
    Last Post: 07-26-2003, 05:09 PM
  3. Showing Running Time & Date in Java
    By Setya in forum Java
    Replies: 1
    Last Post: 07-17-2002, 09:16 AM
  4. help memory
    By kathy in forum Java
    Replies: 0
    Last Post: 11-02-2001, 05:22 PM
  5. Replies: 4
    Last Post: 12-11-2000, 07:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center