Repository navigation
IndexWeaver v1.0.0
Overview
IndexWeaver 1.0.0 is the initial release of an in-memory ID-to-index registry component for open.mp. It allows Pawn scripts to resolve identifiers to array indices without performing linear array searches. The component stores identifier-to-index mappings rather than the underlying application data.
The project requires C++20 and CMake 3.19 or later.
Architecture
- Hybrid storage using a fixed
std::arrayof hash maps for registry types 0–63 and nested hash maps for registry types 64 and above. - Robin Hood hashing through
robin_hood::unordered_flat_map. - Average constant-time (
O(1)) insertion, lookup, and removal. - Capacity retention in fixed registries to reduce allocation overhead during subsequent insertions.
- Removal of dynamic registries when their last mapping is deleted.
- Optional capacity reservation for bulk loading.
- Configurable runtime diagnostic logging.
Pawn API
The public Pawn API provides nine natives for managing mappings, clearing registries, reserving storage capacity, and configuring diagnostic logging.
Performance
The original release reported the following synthetic benchmark results using MSVC with /O2 optimization:
| Operation | Iterations | Approximate elapsed time |
|---|---|---|
| Insertions | 10,000,000 | 0.92 s |
| Lookups | 10,000,000 | 0.62 s |
| Removals | 10,000,000 | 0.69 s |
These measurements are historical results from a synthetic workload and do not establish performance guarantees for production servers.
Installation
The release provides the following files:
- Windows x86:
IndexWeaver.dll - Linux x86:
IndexWeaver.so - Pawn include:
indexweaver.inc
Place the appropriate component binary in the server's components/ directory and copy indexweaver.inc to the Pawn compiler's include directory.
See the README for API documentation, usage examples, and build instructions.
Full changelog: v1.0.0