DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Posts
    1

    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

    Thanks!

  2. #2
    Join Date
    Jul 2008
    Location
    I currently live in Bangalore,India
    Posts
    1
    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, 04:22 PM
  5. Replies: 4
    Last Post: 12-11-2000, 06:00 PM

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links