Skip to content

A High-Performance C++ Analysis Suite for Data Structures & Big O Complexity

Notifications You must be signed in to change notification settings

HuddyLatimer/algorithm-performance-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithmic Efficiency Lab

A High-Performance C++ Analysis Suite for Data Structures & Big O Complexity

Language Build Focus

The Algorithmic Efficiency Lab is a professional-grade C++ project designed to explore the boundaries of computational performance. By implementing core data structures from scratch and benchmarking sorting algorithms, this lab provides deep insights into low-level logic, manual memory management, and algorithmic scaling.


Performance Benchmarks (Live Output)

Below is a terminal capture demonstrating the efficiency gap between $O(n^2)$ and $O(n \log n)$ algorithms on varying data sizes.

Performance Benchmark Capture

Terminal Text Output

========================================
      Algorithmic Efficiency Lab        
========================================

--- Testing Data Structures ---
[PASSED] Linked List: 5 -> 10 -> 20 -> NULL
[PASSED] Stack (LIFO): Popped: 3, Top now: 2
[PASSED] Queue (FIFO): Dequeued: 100, Front now: 200
[PASSED] BST (Inorder): 20 30 50 70 

--- Big O Analysis (Data Size: 1,000) ---
Bubble Sort    : 3.277 ms      [O(n^2)]
Merge Sort     : 0.294 ms      [O(n log n)]
Quick Sort     : 0.095 ms      [O(n log n)]
STL Sort       : 0.077 ms      [Optimized]

--- Big O Analysis (Data Size: 5,000) ---
Bubble Sort    : 87.349 ms     [O(n^2)]
Merge Sort     : 1.814 ms      [O(n log n)]
Quick Sort     : 0.626 ms      [O(n log n)]
STL Sort       : 0.587 ms      [Optimized]

Lab execution complete. Clean memory exit.

Key Features

  • Custom Data Structures: Hand-coded LinkedList, Stack, Queue, and Binary Search Tree with explicit pointer manipulation.
  • Manual Memory Management: Robust constructors/destructors to ensure zero memory leaks during heap allocation.
  • Complexity Benchmarking: Comparative analysis using high-precision timers (<chrono>) to visualize Big O scaling.
  • Generic Programming: Fully templated classes for type-agnostic performance.

Technology Stack

  • Languages: C++17
  • Compilers: MSVC (cl.exe) / GCC (g++)
  • Tools: GDB Debugger, Make, Git
  • Standard Library: Used solely for benchmarking and timing comparison.

Getting Started

Prerequisites

  • A C++17 compliant compiler installed (Visual Studio or MinGW).

Compilation & Execution

  1. Clone the repository.
  2. Build the project:
    g++ -Iinclude main.cpp -o lab_exec.exe
  3. Run Benchmarks:
    ./lab_exec.exe

Learning Narrative

In modern software engineering, reliance on high-level libraries often masks the underlying cost of data manipulation. I developed this lab to bridge that gap. By building these structures without STL containers, I've mastered the intricacies of heap allocation, recursive tree traversals, and the mathematical reality of algorithmic growth. This project serves as a testament to writing code that is not just functional, but optimized for scale.


Developed with a focus on Low-Level Systems and Algorithmic Optimization.

Releases

No releases published

Packages

No packages published