Two implementations search the following eight-entry array for a target identifier:
[14, 27, 35, 48, 63, 72, 86, 91]
Forward searches from the first entry toward the last. Reverse searches from the last entry toward the first. Each implementation performs one equality test per inspected entry and stops immediately when it finds the target. If the target is absent, it inspects all eight entries.
The comparison count is the number of equality tests performed. Complete the table with exact integer counts. In the final column, enter Forward, Reverse, or Tie to identify which implementation performs fewer equality tests. Compare only equality tests; no execution times have been supplied.
Unlock full course notes by signing up
Separate speedup from time saved
Two implementations process the same image batch under matched conditions. Their median batch times are 84 ms84\ \text{ms}84 ms for A and 56 ms56\ \text{ms}56 ms for B. Using A as the reference, calculate B's speedup factor to two decimal places and its percentage time reduction to one decimal place. Use the supplied medians for both comparisons.
Plan a warmed timing experiment
A team will compare the processing time of two implementations after startup effects have settled. Arrange these experimental stages in order, beginning with study design and ending with reporting the evidence.
Include startup in the decision
Measurements for one fixed request workload give the following costs:
Assume a fresh process pays startup once, every request then takes the stated request time, requests run sequentially, and these costs add exactly. Which statements are supported? Select all that apply.
Choose an implementation for a changing job mix
A workload is the collection and mix of jobs to be processed. A document service is choosing between implementations A and B using these measured processing times:
A standard job takes 12 ms with A and 18 ms with B.
A large job takes 80 ms with A and 45 ms with B.