Skip to content

Commit 9e13099

Browse files
committed
Added docs for experimental features
1 parent 8bbd3e5 commit 9e13099

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

Akade.IndexedSet.sln

+8-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SourceGenerator", "SourceGe
3636
EndProject
3737
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akade.IndexedSet.InternalSourceGenerator", "SourceGenerator\Akade.IndexedSet.InternalSourceGenerator\Akade.IndexedSet.InternalSourceGenerator.csproj", "{CAAB99B7-218B-417A-B81A-84F30BAC1B4E}"
3838
EndProject
39-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akade.IndexedSet.InternalSourceGenerator.Tests", "SourceGenerator\Akade.IndexedSet.InternalSourceGenerator.Tests\Akade.IndexedSet.InternalSourceGenerator.Tests.csproj", "{34BEB19B-028A-4CD1-90EB-1E1A62C04671}"
39+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akade.IndexedSet.InternalSourceGenerator.Tests", "SourceGenerator\Akade.IndexedSet.InternalSourceGenerator.Tests\Akade.IndexedSet.InternalSourceGenerator.Tests.csproj", "{34BEB19B-028A-4CD1-90EB-1E1A62C04671}"
40+
EndProject
41+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{A85AE3BF-0E73-4032-9DE5-0EF9200AA43F}"
42+
ProjectSection(SolutionItems) = preProject
43+
docs\Benchmarks.md = docs\Benchmarks.md
44+
docs\ExperimentalFeatures.md = docs\ExperimentalFeatures.md
45+
EndProjectSection
4046
EndProject
4147
Global
4248
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -86,6 +92,7 @@ Global
8692
{71BE73BD-968F-4CA2-A8A1-FF53EB829359} = {7F8BE28E-51E4-4818-B0C9-BDD357CCDAFA}
8793
{CAAB99B7-218B-417A-B81A-84F30BAC1B4E} = {601B55BB-32DD-491A-816E-127FC48BCCEA}
8894
{34BEB19B-028A-4CD1-90EB-1E1A62C04671} = {601B55BB-32DD-491A-816E-127FC48BCCEA}
95+
{A85AE3BF-0E73-4032-9DE5-0EF9200AA43F} = {1D4D9594-0CD1-4103-AA2E-8589FBBD6EAC}
8996
EndGlobalSection
9097
GlobalSection(ExtensibilityGlobals) = postSolution
9198
SolutionGuid = {C65ABA45-764F-4D07-A2A5-800115204611}

README.md

+5-20
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,8 @@ In a nutshell, it allows you to write LINQ-like queries *without* enumerating th
1212
through your data, expect huge [speedups](docs/Benchmarks.md) and much better scalability!
1313

1414
<!--TOC-->
15-
- [Overview](#overview)
16-
- [Design Goals](#design-goals)
17-
- [Performance and Operation-Support of the different indices:](#performance-and-operation-support-of-the-different-indices)
18-
- [General queries](#general-queries)
19-
- [String queries](#string-queries)
20-
- [Features](#features)
21-
- [Unique index (single entity, single key)](#unique-index-single-entity-single-key)
22-
- [Non-unique index (multiple entities, single key)](#non-unique-index-multiple-entities-single-key)
23-
- [Non-unique index (multiple entities, multiple keys)](#non-unique-index-multiple-entities-multiple-keys)
24-
- [Range index](#range-index)
25-
- [String indices and fuzzy matching](#string-indices-and-fuzzy-matching)
26-
- [Computed or compound key](#computed-or-compound-key)
27-
- [Concurrency and Thread-Safety](#concurrency-and-thread-safety)
28-
- [No reflection and no expressions - convention-based index naming](#no-reflection-and-no-expressions-convention-based-index-naming)
29-
- [FAQs](#faqs)
30-
- [How do I use multiple index types for the same property?](#how-do-i-use-multiple-index-types-for-the-same-property)
31-
- [How do I update key values if the elements are already in the set?](#how-do-i-update-key-values-if-the-elements-are-already-in-the-set)
32-
- [How do I do case-insensitve (fuzzy) string matching (Prefix, FullTextIndex)?](#how-do-i-do-case-insensitve-fuzzy-string-matching-prefix-fulltextindex)
33-
- [Roadmap](#roadmap)
3415
<!--/TOC-->
16+
3517
## Overview
3618

3719
A sample showing different queries as you might want do for a report:
@@ -229,9 +211,11 @@ IEnumerable<GraphNode> nodesThatConnectTo3 = set.Where(x => x.ConnectsTo, contai
229211
nodesThatConnectTo1 = set.FullScan().Where(x => x.ConnectsTo.Contains(1)); // returns nodes 3 & 4, but enumerates through the entire set
230212
```
231213

232-
> For range queries, this introduces a small overhead as the results are filtered to be distinct:
214+
> :information_source: For range queries, this introduces a small overhead as the results are filtered to be distinct:
233215
> i.e. `O(log n + m log m)` instead of `O(log n + m)`.
234216
217+
> :information_source: Multi-key string indices are marked experimental. Read more at [Experimental Features](docs/ExperimentalFeatures.md#AkadeIndexedSetEXP0001)
218+
235219

236220
### Computed or compound key
237221

@@ -348,6 +332,7 @@ Potential features (not ordered):
348332
- [x] Benchmarks
349333
- [x] Simplification of string indices, i.e. Span/String based overloads to avoid `AsMemory()`...
350334
- [x] Analyzers to help with best practices
335+
- [x] Multi-key everything: All index types can be used with multiple keys per element.
351336
- [ ] Tree-based range index for better insertion performance
352337
- [ ] Aggregates (i.e. sum or average: interface based on state & add/removal state update functions)
353338
- [ ] Custom (equality) comparators for indices

docs/ExperimentalFeatures.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Experimental Features
2+
3+
The new (.NET 8.0) [Experimental Attribute](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute) is used to mark features that are more likely to change in the future.
4+
**They are usually production-ready**, but we want to gather feedback from the community before we finalize them.
5+
6+
> :warning: In .NET 6 & 7, the `ExperimentalAttribute` is not available and we polyfill it but there is no compiler warning / error that will guide you!
7+
8+
## AkadeIndexedSetEXP0001
9+
:information_source: **Multi-key string indices**
10+
11+
The multi-key string indices API is considered to be experimental because the API is allocation-heavy and might change to a `Span`-based API in the future.
12+
13+
However, the feature itself is production-ready, supported and is here to stay.

0 commit comments

Comments
 (0)