A high-performance compute benchmark application optimized for x86-64 architecture with SSE2 SIMD instructions.
This benchmark suite tests various compute-intensive operations including:
- Matrix multiplication (200x200 matrices)
- Cryptographic hashing (10MB data processing)
- String pattern matching (4.5M character text search)
- Memory operations (50MB copy operations)
- Polynomial evaluation (10M iterations)
The code is optimized using x86 SSE2 SIMD intrinsics for maximum performance on Intel and AMD processors.
Build the Docker image:
docker build -t benchmark-suite .Run the benchmark suite:
docker run --rm benchmark-suiteThis will execute all benchmark tests and display timing results for each operation.
- Optimized for: x86-64 architecture with SSE2 support
- SIMD Instructions: Uses SSE2 intrinsics (
__m128d,__m128i) for vectorized operations - Fallback: Includes scalar fallback implementation for non-x86 platforms
========================================
Compute Benchmark Suite
x86-64 with SSE2 Optimizations
========================================
=== Matrix Multiplication Benchmark ===
Matrix size: 200x200
Time: 8 ms
Result sum: 2.00393e+08
=== Hashing Benchmark ===
Data size: 10240 KB
Time: 9 ms
Hash: 0xbfd8e92e2fb01505
...
The benchmark suite is organized into separate modules:
main.cpp- Main entry point and benchmark orchestrationmatrix_operations.{h,cpp}- Matrix multiplication with SSE2 optimizationshash_operations.{h,cpp}- Cryptographic hashing with SIMD accelerationstring_search.{h,cpp}- String pattern matching using SSE2memory_operations.{h,cpp}- Fast memory copy operationspolynomial_eval.{h,cpp}- Vectorized polynomial evaluation
Each module uses C++11 standard library and x86 SSE2 intrinsics where applicable.