Expand description
Common collection type aliases for consistent usage across the codebase
This module provides re-exports of performance-optimized collection types that should be used throughout the rusty trading system.
§Performance Benefits
§FxHashMap/FxHashSet
- Uses FxHash (Firefox’s fast hash) instead of SipHash
- 2-4x faster for small keys (integers, short strings)
- No cryptographic security (not needed for HFT)
- Better cache locality
§SmallVec
- Stack-allocated for small collections
- Zero heap allocations for typical sizes
- Seamless fallback to heap when needed
- 8-51% performance improvement in benchmarks
Structs§
- Small
Vec - A
Vec-like container that can store a small number of elements inline.
Constants§
- EXECUTION_
CAPACITY - Default capacity for execution-related SmallVecs
- MATCH_
CAPACITY - Default capacity for match-related SmallVecs
- STRATEGY_
CAPACITY - Default capacity for strategy-related SmallVecs
Type Aliases§
- FxHash
Map - Type alias for a hash map that uses the Fx hashing algorithm.
- FxHash
Set - Type alias for a hash set that uses the Fx hashing algorithm.
- Small
Execution Vec - Small vector for executions (typically < 4 executions per order)
- Small
Feature Vec - Small vector for features/signals (typically < 32 features)
- Small
Match Vec - Small vector for match info results (typically < 4 matches per operation)
- Small
Order Vec - Small vector for order collections (typically < 16 orders)
- Small
Price Level Vec - Small vector for price levels (typically < 20 levels)
- Small
Risk Rule Vec - Small vector for risk rules (typically < 8 rules in HFT systems)
- Small
Signal Vec - Small vector for signals (typically < 8 signals per update)
- Small
Strategy Vec - Small vector for strategies (typically < 4 strategies per instrument)
- Small
Symbol Vec - Small vector for symbol lists (typically < 10 symbols)
- Small
Trade Vec - Small vector for trade updates (typically < 8 trades)