Beruflich Dokumente
Kultur Dokumente
CMPT215.3
Performance
Chapter 1 Computer Abstractions and Technology 4
Understanding Performance
Algorithm
+esonse time
Throughut
4!ecution Time
;
& 4!ecution Time
A
3 15s & 1:s 3 1.5
4lased time
CPU time
Performance imro/ed b#
Designing Comuter ;
=
=
= =
=
= =
Chapter 1 Computer Abstractions and Technology 11
%nstruction Count and CP%
=
=
=
Chapter 1 Computer Abstractions and Technology 1
CP% 4!amle
)ame %)A
=
= =
=
= =
=
A is faster.
.b# this much
Chapter 1 Computer Abstractions and Technology 1!
CP% in More Detail
=
=
n
1 i
i i
* Count n %nstructio (CP% C#cles Cloc-
= =
n
1 i
i
i
Count n %nstructio
Count n %nstructio
CP%
Count n %nstructio
C#cles Cloc-
CP%
+elati/e fre@uenc#
Chapter 1 Computer Abstractions and Technology 14
CP% 4!amle
)e@uence 19 %C 3 5
Cloc- C#cles
3 2>1 F 1>2 F 2>3
3 1:
)e@uence 29 %C 3 E
Cloc- C#cles
3 A>1 F 1>2 F 1>3
3 D
Performance deends on
)P4C CPU2::E
=
Chapter 1 Computer Abstractions and Technology 19
Iallac#9 Lo$ Po$er at %dle
Milob#te ? 2
1:
or 1":2A b#tes
Megab#te? 2
2:
or 1":AH"5NE b#tes
sometimes 5rounded8 to 1:
E
or 1":::"::: b#tes
Bigab#te ? 2
3:
or 1":N3"NA1"H2A b#tes
sometimes rounded to 1:
D
or 1":::":::"::: b#tes
Terab#te ? 2
A:
or 1":DD"511"E2N"NNE b#tes
sometimes rounded to 1:
12
or 1":::":::":::"::: b#tes
Petab#te ? 2
5:
or 1:2A terab#tes
sometimes rounded to 1:
15
or 1":::":::":::":::"::: b#tes
4!ab#te ? 2
E:
or 1:2A etab#tes
)ometimes rounded to 1:
1H
or 1":::":::":::":::":::"::: b#tes
Chapter 1 Computer Abstractions and Technology
Arithmetic
July 16, 2014 Chapter 3 Arithmetic for Computers 24
Arithmetic for Comuters
'erations on integers
4!amle9 N F E
G
3
.
2
A
d
d
i
t
i
o
n
a
n
d
)
u
b
t
r
a
c
t
i
o
n
4!amle9 N ? E 3 N F (?E*
FN9 :::: :::: . :::: :111
?E9 1111 1111 . 1111 1:1:
F19 :::: :::: . :::: :::1
)aturating oerations
l
i
c
a
t
i
o
n
July 16, 2014 Chapter 3 Arithmetic for Computers 31
Multilication ,ard$are
Initially 0
July 16, 2014 Chapter 3 Arithmetic for Computers 32
'timiCed Multilier
Cost&erformance tradeoff
Can be ielined
%nstructions
mfhi rd / mflo rd
'ther$ise
+estoring di/ision
)igned di/ision
%nstructions