https://github.com/unrays/tdss
A C++ data-oriented registry with compile-time type mapping and cache-efficient handle-based storage.
https://github.com/unrays/tdss
ast c-plus-plus cache-friendly compile-time compiler-infrastructure cpp custom-allocator data-oriented-design dod ecs-alternative entity-component-system generic-programming high-performance intermediate-representation low-latency memory-management registry-pattern storage-system systems-programming template-metaprogramming
Last synced: about 3 hours ago
JSON representation
A C++ data-oriented registry with compile-time type mapping and cache-efficient handle-based storage.
- Host: GitHub
- URL: https://github.com/unrays/tdss
- Owner: unrays
- License: bsl-1.0
- Created: 2026-05-22T16:22:26.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-22T19:21:41.000Z (about 2 months ago)
- Last Synced: 2026-05-22T20:51:02.367Z (about 2 months ago)
- Topics: ast, c-plus-plus, cache-friendly, compile-time, compiler-infrastructure, cpp, custom-allocator, data-oriented-design, dod, ecs-alternative, entity-component-system, generic-programming, high-performance, intermediate-representation, low-latency, memory-management, registry-pattern, storage-system, systems-programming, template-metaprogramming
- Language: C++
- Homepage: https://unrays.github.io/tdss/
- Size: 30.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# EXOTIC.tdss
A C++ data-oriented registry with compile-time type mapping and cache-efficient handle-based storage.
Originally designed as the data layer of a compiler architecture, this system is general-purpose and can be used in other data-oriented systems.
## Features
- Compile-time type-to-storage mapping
- Contiguous cache-friendly storage
- Handle-based object access
- Data-oriented architecture
- Minimal runtime overhead
## Storage Model
The underlying storage system is built around a hybrid stack/heap strategy.
Each `SmartStorage` is statically evaluated at compile time:
- If the total storage size fits within a fixed internal threshold, data is allocated on the stack.
- Otherwise, it falls back to heap allocation with aligned memory.
This allows predictable performance for small datasets while maintaining scalability for larger ones.
## Configuration
```cpp
using NodeDataRegistryTable = LinearTable<
Entry,
Entry,
Entry,
Entry,
Entry
>;
using NodeDataRegistry = MultiStorageRegistry;
NodeDataRegistry registry(provider);
```
The `MultiStorageRegistry` is a facade that aggregates multiple data domains, driven by a compile-time configuration table, into a unified internal allocation system built on top of `SmartStorage` previously introduced. Additionally, it is possible to define a specific size for `MultiStorageRegistry<..., N>` in bytes, which is then evenly distributed across the underlying storage subsystems.
## Usage
```cpp
registry.construct(nodeLiteral, token);
auto& literalData = registry.get(nodeLiteral);
registry.construct_for(nodeLiteral, token);
registry.construct(nodeOperation, lhs, rhs);
auto& operationData = registry.get(nodeOperation);
registry.reset();
```
## License
This project is licensed under the Boost Software License. See the [LICENSE](LICENSE) file for details.
© Félix-Olivier Dumas 2026