How is it possible for one computer with a low MIPS rating to have a better performance in practice than a computer with a high MIPS rating?

What will be an ideal response?

MIPs measure only instruction execution rates and not the work done. If two systems are almost identical (hardware, ISA, software), the MIPS rating may well allow a comparison.

Let’s look at a hypothetical example (the code fragments A and B are given below). Code fragment A runs on a computer that supports byte?length operations. We have a simple loop that multiplies a byte element by 4 and adds 1. We’ve assumed that the index register is not automatically updated. In Code fragment B, we have assumed that the processor loads 4 bytes at once and supports SIMD?style operations that can be applied to data, plus a post?incrementing register indirect addressing mode. Code B also has a COUNT instruction that performs a decrement and branch back on non?zero.

The number of operations performed by code A is 2 + 256 × 7 = 1794. The number of operations performed by code B is 2 + 64 × 5 = 324. In this case, we have two fragments of code that perform the same action. However, one executes approximately 5.53 times more instructions than the other. Consequently, the MIPS rating of a computer running code B could be five time slower than that of Code A and execution would still be faster.


Code A
MOV r0,#256
LDRB r1,Table
Loop LDRB r2,[r1] ;load a byte
LSLB r2,r2,#2 ;multiply if by 4
ADDB r2,r2,#1 ;add 1
STRB r2,[r1] ;store it
ADDB r1,r1,#1 ;increment the pointer
SUBS r0,r0,#1 ;subtract 1 from the loop count
BNE Loop ;repeat
Code B
MOV r0,#64
LDR r1,Table
Loop PLDRB r2,[r1] ;parallel load 4 bytes
PADDAB r2,#1 ;parallel add 1 to each byte
PLSLB r2,#2 ;parallel shift 4 bytes
STRB r2,[r1,#1]! ;store it
COUNT r0,Loop

Computer Science & Information Technology

You might also like to view...

Today’s ________ computers, smartphones and tablets enable computers to perform tasks truly concurrently.

a) large memory b) multiscreen c) soft keyboard d) multicore

Computer Science & Information Technology

The Windows Remote Desktop application utilizes what protocol to provide secure, encrypted transmissions?

a. File Transfer Protocol (FTP) b. Secure Sockets Layer (SSL) c. Secure Shell (SSH) d. Remote Desktop Protocol (RDP)

Computer Science & Information Technology