Question: Write a program that includes two subprograms, one that takes a single parameter and performs some simple operation on that parameter and one that takes
Write a program that includes two subprograms, one that takes a single parameter and performs some simple operation on that parameter and one that takes 20 parameters and uses all of the parameters, but only for one simple operation. The main program must call these two subprograms a large number of times. Include in the program timing code to output the run time of the calls to each of the two subprograms. Run the program on a RISC machine and on a CISC machine and compare the ratios of the time required by the two subprograms. Based on the results, what can you say about the speed of parameter passing on the two machines?
Step by Step Solution
3.30 Rating (171 Votes )
There are 3 Steps involved in it
ANSWER import time def subprogram1x Perform some simple operation on x return x 1 def subprogram2a b ... View full answer
Get step-by-step solutions from verified subject matter experts
