#todo
- TODO: 没写完
1.3
funny question
Optimize Problems
Is a switch statment always more efficient than a sequence of if-else statements?
- q1 answer:
How much overhead is incurred by a function call?
- q2
answer:
Is a while loop more efficient than a for loop?
- q3
answer:
Are pointer references more efficient than array indexes?
- q4
answer:
Why does out loop run so much faster if we sum into a local variable instead of an argument that is passed by reference?
- q5
answer:
How can a function run faster when we simply rearrange the parenthes in an arithmetic expression?
- q6
answer:
1.4
1.4.1

I/O Devices
Each I/O devices is connected to I/O bus by either a controller or an adapter.
Controller is chip set in the devices or on the system's motherboard.
Adapter is a card that plugs into a slot on the motherboard.
#chapter1/IO