Skip to Main Content
Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson
book

Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson

by Aditya P. Mathur
May 2024
Intermediate to advanced content levelIntermediate to advanced
765 pages
21h 57m
English
Pearson India
Content preview from Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson
Solved Question Papers Q-25
3. a. The following techniques are explained with an example that is used for tuning the
code.
(1) Collect common sub expressions. If an expensive computation appears multiple
times, do it in only one place and remember the result. For example, calling sqrt
twice in a row with the same values; in effect, the computation was
 TRSUEYXEYEZXEZTRSUEYDEYEZXEZ
Compute the square root once and use its value in two places.
(2) Replace expensive operations by cheap ones. This is used by replacing
multiplications by additions or shifts. Division and remainder are much slower than
multiplication. However, there may be improvement if a division can be replaced with
multiplication by the inverse or a remainder ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Software Testing, Video Edition

Effective Software Testing, Video Edition

Mauricio Aniche

Publisher Resources

ISBN: 9781299486720