Skip to content

OMC-24 v3.0.0 — remove PredictiveDictionary, QueueDictionary, DequeDictionary - #15

Merged
Codeturion merged 4 commits into
dev/omni-collections-v2from
phase-8-cull-3
May 8, 2026
Merged

OMC-24 v3.0.0 — remove PredictiveDictionary, QueueDictionary, DequeDictionary#15
Codeturion merged 4 commits into
dev/omni-collections-v2from
phase-8-cull-3

Conversation

@Codeturion

Copy link
Copy Markdown
Owner

Summary

v3.0.0 cull. Removes three Hybrid types whose value-props didn't justify their existence after the v2.x curation pass: PredictiveDictionary, QueueDictionary, DequeDictionary.

Library count: 32 → 29. Hybrid: 9 → 6.

What's removed and why

Type Reason
PredictiveDictionary 259 LOC of pattern bookkeeping. Doesn't auto-prefetch — caller still has to wire PrefetchLikely(context, factory). Any workload predictable enough to benefit can be served by Dictionary<K,V> + a domain-specific predictor. The value prop remained fuzzy even after the v2.0 scope-narrowing.
QueueDictionary Thin wrapper over Queue<KeyValuePair<K,V>> + Dictionary<K,V> synchronized. Saves consumers ~30 lines of bookkeeping. Not load-bearing capability — convenience layer that doesn't earn a top-level type.
DequeDictionary Same shape — wrapper over LinkedList<T> + Dictionary<K, LinkedListNode<T>> synchronized. Same cost/value profile.

What remains (Hybrid, 6 types)

Each has a distinct, defensible value prop with no BCL equivalent:

  • BoundedDictionary — bounded eviction (FIFO order)
  • LinkedDictionary — LRU access-order
  • CounterDictionary — LFU frequency tracking + top-K
  • GraphDictionary — graph topology + value store
  • LinkedMultiMap — multi-value (one key → ordered list)
  • ConcurrentLinkedDictionary — thread-safe LRU

Migration

v2.x v3.0 replacement
PredictiveDictionary<K,V> Dictionary<K,V> + your own n-gram predictor
QueueDictionary<K,V> Queue<KeyValuePair<K,V>> + Dictionary<K,V> (≈30 lines of wrapper)
DequeDictionary<K,V> LinkedList<T> + Dictionary<K, LinkedListNode<T>> (≈30 lines of wrapper)

If anyone needs the v2.x source as a starting point, it's preserved in git history under phase-8-cull-3~1.

No other public-API changes between v2.1.x and v3.0.0.

What changed

deleted:    src/Omni.Collections.Hybrid/PredictiveDictionary/PredictiveDictionary.cs
deleted:    src/Omni.Collections.Hybrid/QueueDictionary/QueueDictionary.cs
deleted:    src/Omni.Collections.Hybrid/QueueDictionary/EnumerationMode.cs
deleted:    src/Omni.Collections.Hybrid/DequeDictionary.cs
deleted:    src/Omni.Collections.Tests/Hybrid/PredictiveDictionaryTests.cs
deleted:    src/Omni.Collections.Tests/Hybrid/QueueDictionaryTests.cs
deleted:    src/Omni.Collections.Tests/Hybrid/DequeDictionaryTests.cs
deleted:    src/Omni.Collections.Benchmarks/Hybrid/PredictiveDictionaryBenchmarks.cs
deleted:    src/Omni.Collections.Benchmarks/Hybrid/QueueDictionaryBenchmarks.cs
deleted:    src/Omni.Collections.Benchmarks/Hybrid/DequeDictionaryBenchmarks.cs
modified:   src/Omni.Collections.Hybrid/PublicAPI.Shipped.txt   (84 lines removed)
modified:   README.md                                            (~30 lines net change)
modified:   Directory.Build.props                                (2.1.1 → 3.0.0)

Test status

1374 passed, 0 failed, 2 skipped  (net8.0)
1345 passed, 0 failed, 2 skipped  (net6.0)

Down from 1526/1497 — the 152 deletions are tests for the cut types. No regressions elsewhere.

Targeting

Base = dev/omni-collections-v2, mirroring prior pattern. After merge: bump already in Directory.Build.props, merge dev → main, tag v3.0.0, push tag → publish workflow auto-fires.

Codeturion added 3 commits May 9, 2026 00:23
…queDictionary

Three Hybrid types whose value-props don't justify their existence after
the v2.x curation pass:

- PredictiveDictionary (259 LOC): n-gram pattern recognition + caller-
  driven PrefetchLikely. Even after the scope-narrowing in v2.0, the
  value prop remained fuzzy — caller still had to wire prefetch with a
  factory, and any workload predictable enough to benefit can be served
  by `Dictionary<K,V>` + a domain-specific predictor.

- QueueDictionary: thin wrapper over `Queue<KeyValuePair<K,V>>` +
  `Dictionary<K,V>` synchronized. The library was saving consumers ~30
  lines of bookkeeping. Not load-bearing capability.

- DequeDictionary: same shape — wrapper over `LinkedList<T>` +
  `Dictionary<K, LinkedListNode<T>>`. Same cost/value profile as
  QueueDictionary.

What remains (29 types, 6 Hybrid):
  Hybrid: BoundedDictionary, LinkedDictionary, CounterDictionary (LFU),
          GraphDictionary, LinkedMultiMap, ConcurrentLinkedDictionary
  Other categories: Linear (6), Spatial (6), Probabilistic (5),
                    Grid (3), Reactive (2), Temporal (1)

Public API breaking change → major version bump v2.1.1 -> v3.0.0.

Files removed:
  - src/Omni.Collections.Hybrid/{PredictiveDictionary,QueueDictionary}/*
  - src/Omni.Collections.Hybrid/DequeDictionary.cs
  - src/Omni.Collections.Tests/Hybrid/{Predictive,Queue,Deque}DictionaryTests.cs
  - src/Omni.Collections.Benchmarks/Hybrid/{Predictive,Queue,Deque}DictionaryBenchmarks.cs
  - 84 lines from src/Omni.Collections.Hybrid/PublicAPI.Shipped.txt

README updates:
  - Header tagline: 32 -> 29 types
  - Hybrid section: 9 -> 6 types, list updated
  - 3 per-type subsections removed
  - §5 Complexity reference: 3 rows removed
  - New "v2.x -> v3.0 migration" section with drop-in replacements

Tests: 1374 net8 / 1345 net6 (was 1526/1497; -152 from cut tests).
All green.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request marks the release of version 3.0.0 by removing three hybrid collection types: PredictiveDictionary, QueueDictionary, and DequeDictionary. The update includes a migration guide in the README and the removal of all associated source code, benchmarks, and unit tests. Feedback was provided to improve the migration guide's accuracy by correctly specifying the generic types for the recommended DequeDictionary replacement.

Comment thread README.md Outdated
|---|---|
| `PredictiveDictionary<K,V>` | `Dictionary<K,V>` + your own n-gram predictor (the v2.x type was 259 LOC of pattern bookkeeping over a plain dict, with no automatic prefetch — the predictor logic is small enough to inline where you need it) |
| `QueueDictionary<K,V>` | `Queue<KeyValuePair<K,V>>` + `Dictionary<K,V>` kept in sync (≈30 lines of wrapper) |
| `DequeDictionary<K,V>` | `LinkedList<T>` + `Dictionary<K, LinkedListNode<T>>` kept in sync (≈30 lines of wrapper) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The replacement description for DequeDictionary<K,V> uses an undefined generic parameter T. To maintain consistency with the QueueDictionary entry above and accurately describe the BCL types required for a performant keyed deque replacement (where the dictionary maps to list nodes to allow O(1) removal), it should use KeyValuePair<K,V>.

Suggested change
| `DequeDictionary<K,V>` | `LinkedList<T>` + `Dictionary<K, LinkedListNode<T>>` kept in sync (≈30 lines of wrapper) |
| `DequeDictionary<K,V>` | `LinkedList<KeyValuePair<K,V>>` + `Dictionary<K, LinkedListNode<KeyValuePair<K,V>>>` kept in sync (≈30 lines of wrapper) |

)

Gemini flagged the v2->v3 migration row for DequeDictionary using a bare 'T'
where K/V were the actual generic parameters. Updated to
'LinkedList<KeyValuePair<K,V>>' + 'Dictionary<K, LinkedListNode<KeyValuePair<K,V>>>'
matching the QueueDictionary row's style, with a note that the dictionary
maps to list nodes for O(1) removal.
@Codeturion

Copy link
Copy Markdown
Owner Author

Fixed in a70175e. Migration row now uses LinkedList<KeyValuePair<K,V>> + Dictionary<K, LinkedListNode<KeyValuePair<K,V>>> consistent with the QueueDictionary row above, and includes a note that the dictionary maps to list nodes so removal stays O(1).

@Codeturion
Codeturion merged commit 74336d9 into dev/omni-collections-v2 May 8, 2026
6 checks passed
@Codeturion
Codeturion deleted the phase-8-cull-3 branch May 8, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant