SSD6 Multiple-Choice Quiz 4

简介: 【ssd6 quiz 4 做了6次 】                     1.To quickly allocate and free many variables of a commonly used data type, we could   (a) minimize the size of the data type.

【ssd6 quiz 4 做了6次 】

 

     

      

        

 

1.To quickly allocate and free many variables of a commonly used data type, we could  
 (a) minimize the size of the data type.
 (b) coalesce blocks when they are freed.
 (c) use sizes which are powers of two.
 (d) keep a linked list of free objects of that type's size.

Correct answer is  (d)
 
2."CPU time" measures  
 (a) the percentage utilization of the CPU by the system.
 (b) the time spent executing system functions.
 (c) the time spent by a program executing program instructions.
 (d) wall time

Correct answer is  (c)
 
3.Which of the following are useful for observing program performance?
I. Direct measurement with a stopwatch.
II. Statistical Sampling.
III. System Monitors
 
 (a) I, II, and III
 (b) I and III only
 (c) I and II only
 (d) II and III only

Correct answer is  (a)
 
4.Amdahl's law, applied to program optimization, says that  
 (a) algorithmic design is more important than code quality for performance
 (b) program measurement is a prerequisite to optimization
 (c) each optimization about doubles a program's performance
 (d) successive program optimizations tend to produce diminishing returns
Correct answer is  (d)
 

2."Wall time" measures  
 (a) the total duration of a program's execution.
 (b) idle time.
 (c) the user time plus the system time.
 (d) the time a program spends waiting for input and output.

Correct answer is  (a)
 
3.Which of the following are advantages of using statistical sampling to profile programs?
I. Exact run times of all functions can be determined.
II. Code can be instrumented automatically.
III. The performance impact due to measurement can be minimal.
 
 (a) I and III only
 (b) II and III only
 (c) I and II only
 (d) I, II, and III

Correct answer is  (b)
 

4.Which of the following is likely to offer the best performance improvement for programs that spend 50% of their time comparing strings?  
 (a) Be sure to use hardware string-comparison instructions.
 (b) Call a library function for string comparison.
 (c) Store strings uniquely so that pointer comparison can be used.
 (d) Write in-line code for string comparison to eliminate a procedure call.
Correct answer is  (c)

 

1.A memory pool is a large block of memory from which small objects are allocated piecemeal by breaking them off from the pool as required. Under which of the following conditions would such a scheme result in greatly improved performance?
I. All objects allocated from the pool are freed at around the same time.
II. All objects allocated from the pool are of similar sizes.
III. A garbage collector takes care of freeing memory.
 
 (a) II only.
 (b) I only.
 (c) I and II only.
 (d) III only.

Correct answer is  (b)

目录
相关文章
|
7天前
|
算法 数据挖掘 数据处理
文献解读-Bioinformatic Methods and Bridging of Assay Results for Reliable Tumor Mutational Burden Assessment in Non-Small-Cell Lung Cancer
文章讨论了肿瘤突变负荷(TMB)作为免疫治疗生物标志物的重要性及其测定方法的标准化问题。强调了不同TMB测定方法间存在的差异,以及统一这些方法的必要性。尽管存在差异,研究发现不同方法的结果具有良好相关性。研究组呼吁建立准确、可重复的TMB评估标准,以促进其在临床实践中的应用。
17 0
|
索引
Result window is too large, from + size must be less than or equal to: [10000]
Result window is too large, from + size must be less than or equal to: [10000]
253 0
|
搜索推荐 索引
Term Suggester 中 suggest_mode 的三种模式missing、popular、always 的区别
Term Suggester 中 suggest_mode 的三种模式missing、popular、always 的区别
《Towards A Fault-Tolerant Speaker Verification System A Regularization Approach To Reduce The Condition Number》电子版地址
Towards A Fault-Tolerant Speaker Verification System: A Regularization Approach To Reduce The Condition Number
91 0
《Towards A Fault-Tolerant Speaker Verification System A Regularization Approach To Reduce The Condition Number》电子版地址
ValueError: Sample larger than population or is negative
ValueError: Sample larger than population or is negative
207 0
成功解决lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got “0.02“
成功解决lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got “0.02“

热门文章

最新文章