How roslindesiredziele-hash/algorithms-sorting-benchmark works
This is a sorting-algorithm benchmark: the runner generates random inputs, times six sorts over repeated runs, checks sortedness, averages timings, and writes CSV results; a separate script turns that CSV into comparison charts. The custom Vec is the shared in-memory data structure. The README documents these capabilities, and the excerpts show the runner, sort implementations, Vec, and plotting script. The chart and CSV flows are explicit; no separate runtime service or database is involved.
Main entry points: main.cpp Benchmark Runner · Vec.cpp Dynamic Vec · sorts.cpp Bubble Sort · data.csv Benchmark CSV
Components 13
Benchmarking
- Benchmark Runner
src/main.cpp - Random Inputs
src/main.cpp
Sorting
- Bubble Sort
src/sorts.cpp - Insertion Sort
src/sorts.cpp - Merge Sort
src/sorts.cpp - Quick Sort
src/sorts.cpp - Heap Sort
src/sorts.cpp - Shell Sort
src/sorts.cpp - Sortedness Check
src/sorts.cpp
Data Structure
- Dynamic Vec
src/Vec.cpp
Results Analysis
- Benchmark CSV
data/data.csv - Comparison Charts
data/plot_results.py
Other components
- User
Connections 18
- User → Benchmark Runner: runs benchmark
README.md - Benchmark Runner → Random Inputs: generates
src/main.cpp - Benchmark Runner → Bubble Sort: times
src/main.cpp - Benchmark Runner → Insertion Sort: times
src/main.cpp - Benchmark Runner → Merge Sort: times
src/main.cpp - Benchmark Runner → Quick Sort: times
src/main.cpp - Benchmark Runner → Heap Sort: times
src/main.cpp - Benchmark Runner → Shell Sort: times
src/main.cpp - Benchmark Runner → Sortedness Check: checks results
src/main.cpp - Benchmark Runner → Benchmark CSV: writes averages
src/main.cpp - Comparison Charts → Benchmark CSV: reads results
data/plot_results.py - Benchmark Runner → Dynamic Vec: uses
src/main.cpp - Bubble Sort → Dynamic Vec: sorts
src/sorts.cpp - Insertion Sort → Dynamic Vec: sorts
src/sorts.cpp - Merge Sort → Dynamic Vec: sorts
src/sorts.cpp - Quick Sort → Dynamic Vec: sorts
src/sorts.cpp - Heap Sort → Dynamic Vec: sorts
src/sorts.cpp - Shell Sort → Dynamic Vec: sorts
src/sorts.cpp