Explore BrainMass

Coding Time in C

For a certain program, 1% of the code accounts for 50% of the execution time. Compare the following strategies with respect to programming time and execution time. Assume that it would take 100 man-months to write it in C, and that assembly code is 10 times harder to write and four times more efficient. Also assume it would take 100 hours in execution if entire program is written in C.

a. Entire program in C.
b. Entire program in assembly.
c. First in C, then the key 1% rewrite in assembly.

Solution Preview

The 3 strategies can be compared based on i) Time taken to write the program ii) Time taken by program to execute.

a) If the entire program is written in C it would take only 100 man hours but it will take 100 hours ...

Solution Summary

This solution clearly discusses time taken by a program in coding, execution. It clearly discusses coding of a program in C and also in Assembly code by taking an example.