A benchmark testing suite written entirely in C++ for a Computer Organization II course.
The program measures execution times for CPU arithmetic operations, memory access, and hard drive I/O performance.
This project implements five performance benchmarks:
- 32-bit Integer Operations Benchmark
- 64-bit Floating-Point Operations Benchmark
- Memory Benchmark
- Hard Drive Benchmark (100-byte transfers)
- Hard Drive Benchmark (10,000-byte transfers)
Each benchmark records total execution time and outputs the final results at the end of program execution.
Operations performed:
- (10^{10}) integer additions
- (5 \times 10^{9}) integer multiplications
- (2 \times 10^{9}) integer divisions
Reference execution time: 100 seconds
Same benchmark structure as the integer test, but using double-precision floating-point values.
Operations performed:
- (10^{10}) floating-point additions
- (5 \times 10^{9}) floating-point multiplications
- (2 \times 10^{9}) floating-point divisions
Reference execution time: 100 seconds
Operations performed:
- Read from (5 \times 10^{9}) different array elements
- Write to (5 \times 10^{9}) different array elements
- 4 bytes accessed per operation
Reference execution time: 100 seconds
Operations performed:
- Read a file of (10^{9}) bytes
- Write (10^{9}) bytes to a file
- 100-byte transfers per operation
Reference execution time: 250 seconds
Operations performed:
- Read a file of (10^{9}) bytes
- Write (10^{9}) bytes to a file
- 10,000-byte transfers per operation
Reference execution time: 10 seconds
- C++
- Standard Template Library (STL)
- File Streams (
fstream) - High-resolution timing utilities (
chrono)
Compile using g++:
g++ benchmark_proj.cc -O1 -o benchmarkRun the program:
./benchmark_compiledThe program outputs:
- Integer benchmark execution time
- Floating-point benchmark execution time
- Memory benchmark execution time
- Hard drive benchmark 1 execution time
- Hard drive benchmark 2 execution time
Output is displayed once after all benchmarks complete.
The repository includes a detailed report containing:
- Benchmark methodology
- Hardware specifications
- Operating system information
- Execution results
- Performance analysis
- Conclusions
Developed for a Computer Organization II course focusing on computer architecture, memory systems, and performance evaluation.
Benchmarks were executed on the following system:
- Device Name: HackedMainframe
- Processor: AMD Ryzen AI 5 340 with Radeon 840M Graphics @ 2.00 GHz
- Memory: 16 GB RAM (15.3 GB usable)
- System Type: 64-bit Operating System, x64-based Processor
- Operating System: Windows 11
Full benchmark analysis and execution results are included in the committed project report.