Skip to content

naitik-2006/OrderMatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrderMatcher

A high-performance C++ Order Matching Engine designed for low-latency trading simulations. This V1 implementation focuses on strict Price-Time priority matching using standard STL containers with an eye toward future custom memory optimizations.

Performance Benchmarks

The following benchmarks were conducted on a 12-core CPU @ 2611 MHz. Results show the throughput in items per second.

Benchmark Debug Mode (with tracking) Release Mode (Optimized)
Add Order 645.16 k/s 4.64 M/s
Cancel Order 2.04 M/s 14.55 M/s
Modify Order 1.01 M/s 8.00 M/s
Mixed Workload 767.39 k/s 6.04 M/s

Note

Debug mode includes additional integrity tracking and assertions which are disabled in the Release build for maximum performance.

Build Instructions

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
./benchmarks/Release/run_benchmarks.exe

Folder Structure

OrderMatcher/
├── benchmarks/         # Performance testing suite & helpers
│   ├── BenchmarkHelpers.hpp
│   └── bench_orderbook.cpp
├── data/               # Project data & sample orders
├── design_decisions.md # Tactical design documentation
├── engine/             # Engine orchestration logic
├── orderbook/          # Core matching implementation
│   ├── include/        # Headers (orderbook.hpp, order.hpp)
│   └── src/            # Implementation (orderbook.cpp)
├── src/                # Project entry point (main.cpp)
├── tests/              # Unit testing suite (tests.cpp)
├── CMakeLists.txt      # Build configuration
├── README.md           # Project overview & benchmarks
└── v1.md               # Architecture & milestones

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages