<<Depth Exploration C ++ Model>> Question (Chapter 3) (below)

zhaozj2021-02-11  245

3.5 Efficiency of members of the object

1. Can we affirm the efficiency performance of a program without opening an optimized switch? why? (P127)

2. Is a single inheritor affect Data MEMBER's access efficiency? why? (P128)

Lessons of lippman:

Programmers should conduct actual tests if they care about the efficiency. Do not deliver or hypothesis.

Optimization operation does not necessarily work effectively.

3.6 Pointer to Data MEMBERS

1. Take a Class's Data MEMBER address, what do you mean? (P130)

2. How to distinguish a pointer that "does not point to any Data MEMBER" and a pointer pointing to "The First Data MEMBER"? (P131)

3. How is the efficiency of access data in the following three cases? Why can't it produce this? (P134-P135)

A. Access directly. B. Pointer points to Member already helped. C. Pointer points to Data MEMBER.

4. Why is virtual inheritance to impact optimization? (P136)

转载请注明原文地址:https://www.9cbs.com/read-4936.html

New Post(0)