Skip to content

The Industrial Philosophy

Academic vs. Industrial

Academic CS teaches you how to implement QuickSort. Industrial CS teaches you why QuickSort crashed your production server at 3:00 AM.

Why build this library?

Python has a built-in .sort() method. It is written in C, it is highly optimized (Timsort), and it is faster than anything we can write in pure Python.

So why are we rebuilding standard algorithms?

Because "it just works" is not acceptable for an engineer. When you use a black-box library, you surrender control. In the Arprax Laboratory, we prioritize three things:

1. Visibility (The Profiler)

We don't just run code; we measure it. Every algorithm in this library is designed to be hooked into the Arprax Profiler, giving you real-time feedback on: * Time Complexity: How does execution time scale with input size ($N$)? * Memory Pressure: How many objects are created on the Heap?

2. Predictability

Standard libraries often hide complexity. We expose it. Our data structures (LinkedLists, Trees, Graphs) are strictly typed and throw errors before runtime whenever possible.

3. Education

This library is "Read-Ware." The source code is written to be read by humans first, and computers second. It serves as the reference implementation for students at Arprax Academy.


Case Study: Bubble vs. Merge Sort

Using the ArpraxProfiler, we can visualize the performance gap between $O(N^2)$ and $O(N \log N)$ algorithms.

N Bubble Sort (s) Merge Sort (s)
500 0.00673 0.00057
1000 0.02975 0.00120
2000 0.12769 0.00264

Observations

  1. Scalability: When $N$ doubles, Bubble Sort's time increases by ~4x, while Merge Sort increases by ~2.2x.
  2. The "Industrial" Gap: At $N=2000$, Merge Sort is already ~48x faster.

🚀 Next Steps

We are currently porting our internal tools to this public repository.

  • [ ] The Profiler: Benchmarking CPU and Memory.
  • [ ] Sorting: Visualizing $O(N \log N)$ vs $O(N^2)$.
  • [ ] Search: Binary Search vs. Hash Maps.
  • [ ] Graphs: Pathfinding in the real world.