Try using a stopwatch to time the execution of the programs in this chapter. Time from hitting return on the command until the next prompt appears. What is the relationship between execution time and the length of the sound? Is it a linear relationship (i.e., longer sounds take longer to process and shorter sounds take less time to process)? Or is it something else? Compare the individual programs. Does normalizing a sound take longer than raising (or lowering) the amplitude a constant amount? How much longer? Does it matter whether the sound is longer or shorter?

What will be an ideal response?

The precise amount of time will depend on the computer’s processing power on which the algorithms are run on. However, in general longer sounds run on the same function take longer. Functions that involve iterating more also take longer. This means that normalizing takes the longest out of the programs in this chapter as it involves iterating over the entire length of the sound twice.

Computer Science & Information Technology

You might also like to view...

The process of removing unwanted characters, rearranging data in a cell, or correcting erroneous data in text is called ________

A) Flash Fill B) purifying C) cleansing D) concatenating

Computer Science & Information Technology

Computers process data under control of sets of instructions called .

a. The operating system. b. Computer programs. c. Computer programmers. d. None of the above.

Computer Science & Information Technology