Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperlarson committed Aug 7, 2024
1 parent 6b96a8e commit 79a33d8
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
# BoundedPriorityDeque.hpp

A highly efficient, single-header C++ library implementing a bounded priority deque with a focus on performance and versatility through templating. This library utilizes a circular buffer, chosen for its robust performance characteristics.
The Bounded Priority Deque is a no-nonsense, single-header C++ library built for one purpose: to efficiently manage and optimize data handling without the typical overhead associated with standard library structures. Designed specifically for high-performance environments, it excels in operations like multi-threaded ball tree constructions and the Traveling Salesman Problem (TSP) optimizations.

## Release Status: Early Development
## Release Status: Nearing Completion

This project is currently in active development and is subject to significant changes. However, a stable release is anticipated in the near future.
The final stretch before the stable release of the Bounded Priority Deque is designed to enhance project performance with unmatched efficiency.

[Early Release Documentation](https://bounded-priority-deque.cooperhlarson.com)
[Access Early Release Documentation](https://bounded-priority-deque.cooperhlarson.com)

## Motivation

The bounded priority deque addresses a notable gap in the standard C++ library and fills a niche not currently catered to by lightweight libraries available on major C++ package managers such as Conan. This project emerged from complex requirements in multi-threaded ball tree constructions and Traveling Salesman Problem (TSP) solution optimizations.
Developed out of necessity, the Bounded Priority Deque addresses the shortcomings of standard library containers by eliminating unnecessary allocations, along with the pruning of data without deallocation costs. This approach ensures high performance and reduces overhead, making it an ideal choice for complex algorithmic challenges.

### Evolution of the Core Data Structure

The design of this deque has undergone numerous iterations, each aimed at enhancing performance and efficiency:

- Sorted vector with binary search
- Vector-based min heap
- Unordered set
- Ordered set
- Priority queue
- Deque
- Ordered set of indexed linked-list nodes
- **Current Implementation:** Circular buffer-based vector
- This minimizes destructor calls, addressing a previously identified performance bottleneck.
- It enables O(1) time complexity for pop operations from the front of the deque, a significant improvement over previous methods that approached O(n) complexity.
The focus has been clear from the start: deliver uncompromised performance:
- Evolved from simpler data structures to a relatively sophisticated circular buffer-based vector, which minimizes destructor calls and eliminates common performance bottlenecks.
- Implements an O(1) time complexity for critical operations, significantly outperforming traditional models in efficiency.

## Key Features

- **Single-Header Library:** Streamlined and efficient, suitable for integration into various C++ projects without the overhead of additional compilation units.
- **Optimized for TSP Solutions:** Crucial to various facets of the TSP optimization process, including BallTree construction, nearest neighbor queries, and multithreaded 2-opt and 3-opt tasks.
- **Developer Control:** Intentionally designed without "safety rails" in release mode to maximize performance:
- Throws exceptions and provides debug information in debug mode.
- Expects the programmer to manage thread safety, accommodating highly efficient multithreaded operations.
- **Efficient Merging Capability:** The `operator+=()` for merging deques aims to facilitate efficient integration of results from multiple threads without the need for mutex locks, given appropriate task architecture.
- **Performance Insights:** Preliminary testing suggests performance improves as the size of the parent deque decreases and more data is culled.
- **Single-Header Library:** Simple integration into any C++ project, optimizing both development time and system resources.
- **Optimized for High-Stakes Tasks:** Perfectly suited for demanding tasks in TSP solutions and advanced data structure constructions, where performance and speed are non-negotiable.
- **Developer-Focused:** Built for developers who need full control, it operates without the usual safety checks in release mode to push the boundaries of performance:
- In debug mode, it provides extensive diagnostic support while leaving runtime efficiency entirely in the hands of developers in release mode.
- **Superior Merging Capability:** Integrates a powerful merging operator that combines results from different threads efficiently and effectively, ideal for merging local-thread optimzations in a multi-threaded environment.
- **Tested Efficiency:** Designed to perform under pressure, it consistently delivers speed and reliability, managing complex tasks seamlessly across various operational scales.

## Future Directions

Further information and updates on this library will be provided as development progresses. Interested users and contributors are encouraged to keep an eye on repository updates for the latest enhancements and stability improvements.
Continual improvements are in the pipeline to further enhance the Bounded Priority Deque's capabilities. Keep an eye on the repository for upcoming updates that will continue to push the limits of what can be achieved with this tool.

0 comments on commit 79a33d8

Please sign in to comment.