main #
VSL Performance Benchmarks
This directory contains comprehensive performance benchmarks for VSL's pure V BLAS and LAPACK implementations.
Overview
The benchmark suite demonstrates the performance characteristics of VSL's pure V implementations compared to C backends (OpenBLAS/LAPACKE). All benchmarks use V's built-in benchmark module for accurate timing measurements.
Running Benchmarks
Run All Benchmarks
##v run benchmarks/blas_bench.v
##v run benchmarks/lapack_bench.v
##v run benchmarks/compare_backends.v
Run Specific Benchmarks
##v run benchmarks/blas_bench.v --sizes 100,500,1000
##v -d vsl_blas_cblas run benchmarks/blas_bench.v
Benchmark Structure
blas_bench.v: Comprehensive BLAS Level 1, 2, and 3 benchmarkslapack_bench.v: LAPACK operation benchmarks (linear systems, factorizations, etc.)compare_backends.v: Direct comparison between pure V and C backendsbenchmark_utils.v: Shared utilities for benchmark setup and reporting
Understanding Results
Benchmark results show:
- Operation: The BLAS/LAPACK function being benchmarked
- Size: Problem size (vector length, matrix dimensions)
- Time: Average execution time over multiple runs
- Throughput: Operations per second (where applicable)
- GFLOPS: Floating-point operations per second (for compute-intensive operations)
Performance Notes
- Benchmarks are run multiple times and averaged for accuracy
- Warm-up runs are performed before timing to account for cache effects
- Results may vary based on hardware, compiler optimizations, and system load
- Pure V backend performance is competitive with C backends for most operations
Contributing
When adding new benchmarks:
- Follow the existing benchmark structure
- Use the
benchmarkmodule from V's standard library - Include multiple problem sizes
- Document any special considerations
- Ensure benchmarks are reproducible