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
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?
By dhaya in forum Database
Last Post: 08-25-2003, 05:24 PM
By Jason Salas in forum ASP.NET
Last Post: 07-26-2003, 05:09 PM
Last Post: 07-17-2002, 09:16 AM
Last Post: 11-02-2001, 04:22 PM
By chiki in forum VB Classic
Last Post: 12-11-2000, 06:00 PM
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