
Computer Architecture Performance Evaluation
Overview
In this project, I assessed how effectively a C++ backpack benchmark performed on two distinct computer architectures: an x86 system and a POWER8 system. Examining the effects of CPU performance, compiler optimization, and processor architecture on program execution was the goal. I used hardware performance counters to verify analytical CPU performance calculations, measured execution times, compared generated file sizes, and ran the identical software on both platforms.My knowledge of computer architecture, compiler optimizations, benchmarking methods, Linux development tools, and performance analysis has all improved as a result of this effort. Additionally, it provided me with hands-on experience gathering and analyzing actual performance data from various hardware platforms.
Tools and Technologies Used
-
C++
-
Linux
-
GCC Compiler
-
x86 Architecture
-
POWER8 Architecture
-
Performance Benchmarking
-
Compiler Optimization (-O0 / -O3)
-
Linux time Command
-
Linux perf Tool
-
CPU Performance Analysis
Key Steps
1. Designed the ArrayList Class
I began by learning as much as I could about the two systems that were employed for the task. Processor architecture, clock speeds, operating systems, compiler versions, and hardware combinations were all compared. Knowing these distinctions made it easier to understand why each system behaved differently in subsequent tests.

2. Compile the Program and Compare Code Size
I created the assembly file, object file, and executable for the knapsack program using GCC after recording the hardware. I examined why the source file remained the smallest while the assembly file was the largest by comparing the sizes of each created file on the two systems. The findings demonstrated that, despite the two architectures' disparate processing designs, GCC produced output sizes that were almost equal.


3. Measure Program Execution Time
X64 RAW DATA

After the software was compiled, I ran it six times on both the x86 and POWER8 platforms to benchmark the executable. Before determining the average values for each platform, I noted the actual, user, and system execution times. The x86 system completed the benchmark far faster than the POWER8 system, demonstrating how processor architecture and single-core performance affect execution time.
POWER8 RAW DATA

4. Evaluate Compiler Optimization

x86 Results
I recompiled the benchmark using both the -O0 and -O3 optimization options after measuring the default execution times. I subsequently carried out the benchmarking procedure once more and contrasted the outcomes. On both systems, enabling compiler optimizations drastically decreased execution times, showing how optimization strategies like instruction scheduling, function inlining, and loop optimization can greatly enhance application performance.

POWER8 Results

