How astridaaa/objektinis2 works
Project type and purpose
• This is a C++ command-line benchmarking tool (open-source CLI application) for comparing STL container performance (vector, deque, list) under three “student grouping and sorting” strategies.
• It reads input files containing student records, applies one of three partitioning/sorting strategies, measures execution times, and outputs results, comparing container types and compiler flags.
File structure
• Top-level:
• makefile, main.cpp/.h, functions.h
• Strategic implementations under “Strategijos/” (three .cpp files + functions.cpp + strategija.h + makefile)
• Code separation:
• main.cpp: CLI driver, argument parsing, orchestration
• functions.cpp/.h: I/O and utility templates (nuskaitymasFile, sorting functions)
• Strategijos/*.cpp & strategija.h: three strategy implementations (studentuIsskirstymas1/2/3 + rikiavimas)
• Build & run: two makefiles (root and Strategijos/) define targets for each strategy and the combined run_main.
README for additional insights
• Describes the four key functions: templated file reader, three grouping strategies, three sorting variants.
• Shows performance tables, compiler flags, and recommended strategy/container combinations.
Crucial architectural elements
• Strategy interface (to illustrate plugin-style extensibility)
• Templated file reader decoupled from container type
• Measurement wrapper around every major stage
• Build targets in Makefiles mapping strategies to runX targets