In this weekâ€™s lab, you will key in and compile a C++-supplied program. Using the instructions provided, you will proceed to inspect, comment, and produce representative assembly code. PART A: We will look at C code versus machine code. Write the following code in cygwin using vi and save it as code.c. Part B: Linux and Windows show assembly in different formats. The code differences are shown below. Copy the code below into a new Visual Studio Project. Compile the C++ code. In the Solution Explorer, right click on the .cpp file and choose properties.
GSP 215 Week 4 Homework Optimizing Program Performance
FOR MORE CLASSES VISIT www.gsp215rank.com
Optimizing Program Performance A programmer must write correct code that is clear and concise. There are also circumstances in which a programmer must write fast and efficient code. Processing video frames in real time must be fast. We will talk about ways to optimize code. Given the following code, perform these operations to optimize the code. See Chapter 5 in the book for more details on code optimization. Please use comments to document all optimizations you have made to the code. 1. Using switch instead of if 2. Eliminating length calls out of the loop test