Skip to content

TemporalCollections - v1.2.0

Latest

Choose a tag to compare

@engineering87 engineering87 released this 22 Nov 16:35
021a933

A significant update that brings modern runtime support, two powerful new temporal data structures, and multiple enhancements across the library.

🔧 Runtime & Platform Updates

▶️ Full Support for .NET 10

TemporalCollections now targets .NET 10, providing:

  • Improved JIT optimizations
  • Better memory throughput
  • Enhanced threading and synchronization primitives
  • Access to the latest C# features and platform APIs

Backward compatibility with previous .NET versions remains intact where applicable.

🆕 New Temporal Data Structures

1. TemporalSegmentedArray

A highly optimized segmented array for time-ordered workloads, designed for:

  • ingestion-heavy event streams
  • high-frequency telemetry pipelines
  • log/trace collection
  • sliding-window analytics

🔍 Highlights:

  • Amortized O(1) append for monotonic timestamps
  • Segmented storage for memory efficiency
  • Fast range queries (O(log S + K))
  • Efficient segment-level cleanup and retention

2. TemporalMultimap<TKey, TValue>

A temporal multimap where each key maps to multiple timestamped values, while still enabling global temporal queries.

Perfect for:

  • user/session histories
  • audit logs
  • grouped event streams
  • entity timelines

📌 Key Features:

  • Per-key temporal ordering
  • Global time-based queries across all keys
  • Efficient per-key and global retention methods
  • Strict monotonic timestamps for consistency

📚 Documentation Improvements

The README has been fully updated to reflect:

  • the two new data structures
  • their usage guidance
  • Big-O performance comparisons
  • expanded examples
  • updated threading and locking model overview

These updates help developers understand when and how to use each structure effectively.

🛠 Internal Enhancements

This release includes several internal improvements:

  • Better timestamp boundary validation
  • More consistent behavior across all ITimeQueryable implementations
  • Minor refactoring for clarity and maintainability
  • Uniform time semantics based on DateTimeOffset
  • Additional safety in concurrent operations

All changes are fully backward-compatible.

📦 Summary of Changes

Added

  • TemporalSegmentedArray<T>
  • TemporalMultimap<TKey, TValue>
  • Full .NET 10 support

Improved

  • README documentation
  • Performance characteristics in several collections
  • Thread-safety consistency
  • Internal cleanup and retention logic

Fixed

  • Minor inconsistencies in time-range handling
  • Edge cases in nearest-item selection

✔️ Upgrade Notes

If you're already using TemporalCollections:

  • No breaking changes were introduced
  • All APIs remain backward compatible
  • You may simply update your package reference: