-
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!
-
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
-
By dhaya in forum Database
Replies: 11
Last Post: 08-25-2003, 05:24 PM
-
By Jason Salas in forum ASP.NET
Replies: 0
Last Post: 07-26-2003, 05:09 PM
-
Replies: 1
Last Post: 07-17-2002, 09:16 AM
-
Replies: 0
Last Post: 11-02-2001, 05:22 PM
-
By chiki in forum VB Classic
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
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|