You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1319,117 +1319,18 @@ MARKDOWN_LD_KB_BENCHMARK_PROFILE=cpu dotnet run --project benchmarks/MarkdownLd.
1319
1319
1320
1320
Benchmark reports are written to `artifacts/benchmarks/results` as Markdown, CSV, and full JSON. The reports are intentionally ignored by git because they depend on the local machine and current system load. PR validation and the dedicated workflow in `.github/workflows/benchmarks.yml` both run the complete BenchmarkDotNet suite and upload the `benchmarkdotnet-results` artifact. The benchmark config adds one `Default` job only when the command does not already pass `--job`, `--job=...`, or `-j`.
1321
1321
1322
-
The exported BenchmarkDotNet reports include the diagnostic columns that matter for this library:
1322
+
The full metric definitions, workload profiles, and current result tables are maintained in [Performance Benchmarks](docs/Features/PerformanceBenchmarks.md). The README keeps only the current headline numbers from the May 3, 2026 local BenchmarkDotNet 0.15.8 run on Apple M2 Pro with .NET 10.0.5:
1323
1323
1324
-
| Area | Report data | Used for |
1325
-
| --- | --- | --- |
1326
-
| Latency | `Mean`, `Error`, `StdDev`, `Ratio`, `RatioSD`; full JSON also keeps min, quartiles, max, percentiles, and raw measurements | compare retrieval paths under the same generated workload |
1327
-
| Allocation and GC | `Allocated`, `Alloc Ratio`, `Gen0`, `Gen1`, `Gen2` | find APIs that allocate enough to hurt repeated search calls |
1328
-
| Threading | `Completed Work Items`, `Lock Contentions` | identify SPARQL and federation paths that schedule work or contend on locks |
1329
-
| Repro metadata | runtime, JIT, platform, job, iteration counts, corpus profile, query scenario | keep local runs comparable without pretending they are machine-independent |
1330
-
| Optional profiles | EventPipe `cpu`, `gc`, or `jit` artifacts when `MARKDOWN_LD_KB_BENCHMARK_PROFILE` is set | inspect hot methods after a suspicious benchmark result |
1331
-
1332
-
Benchmark workload profiles are named by shape instead of using unexplained document-count params:
Allocation, GC, work-item, and lock-contention columns come directly from BenchmarkDotNet diagnosers. Treat ratios and relative pressure inside the same run as the useful signal; local numbers are diagnostics, not release-grade SLA measurements.
1392
-
1393
-
Persistence and export on the `LargeCorpus` profile:
1394
-
1395
-
| Method | Mean | StdDev | Allocated |
1396
-
| --- | ---: | ---: | ---: |
1397
-
| `CreateSnapshot` | 4.494 ms | 0.0045 ms | 5.18 MB |
1398
-
| `SerializeTurtle` | 9.249 ms | 0.0436 ms | 18.07 MB |
1399
-
| `SerializeJsonLd` | 12.371 ms | 0.0586 ms | 20.31 MB |
1400
-
| `ExportMermaidFlowchart` | 5.884 ms | 0.0899 ms | 7.15 MB |
1401
-
| `ExportDotGraph` | 6.039 ms | 0.0050 ms | 7.55 MB |
1402
-
| `SaveTurtleToFile` | 29.641 ms | 0.1868 ms | 34.74 MB |
1403
-
| `SaveJsonLdToFile` | 38.491 ms | 1.5349 ms | 37.02 MB |
1404
-
| `LoadTurtleFromFile` | 35.708 ms | 0.8051 ms | 28.10 MB |
1405
-
| `LoadJsonLdFromFile` | 90.663 ms | 2.9780 ms | 75.32 MB |
1406
-
1407
-
Broad graph lifecycle:
1408
-
1409
-
| Method | Mean | StdDev | Allocated | Gen0 | Gen1 | Gen2 | Work items |
| Short deletion | 6.726 ns | 94.380 ns | 14.03x | 0 B | 112 B |
1429
-
| Short substitution | 33.756 ns | 82.509 ns | 2.44x | 0 B | 112 B |
1430
-
| Long insertion | 21.894 ns | 8,244.786 ns | 376.58x | 0 B | 640 B |
1431
-
| Long no-match | 53.268 ns | 9,208.866 ns | 172.88x | 0 B | 672 B |
1432
-
1433
-
This run reflects the allocation-focused search hot-path pass: BM25 now uses the shared allocation-aware tokenizer, direct scoring loops, and bounded top-N match retention; fuzzy edit distance uses stack-backed bit-vector masks for short residual tokens and pooled rows for the long-token fallback; and Tiktoken search keeps only bounded top-N candidates while TF-IDF weighting updates dictionary values without temporary key arrays.
1434
-
1435
-
These numbers are local measurements, not a cross-machine performance contract. The README keeps compact slices only; [Performance Benchmarks](docs/Features/PerformanceBenchmarks.md) and the full Markdown, CSV, and JSON BenchmarkDotNet reports remain the source for detailed diagnostics.
1326
+
| Full suite | 118 BenchmarkDotNet cases using the `Default` job |
1327
+
| Graph build | `LargeCorpus` builds in 45.457 ms with 57.74 MB allocated |
1328
+
| Low-latency search | `ShortDocuments` exact ranked graph search is 1.195 ms / 2.37 MB; BM25 is 1.659 ms / 3.07 MB |
1329
+
| Typo-tolerant search | BM25 fuzzy stays opt-in; `ShortDocuments` exact fuzzy search is 1.979 ms / 3.07 MB |
1330
+
| RDF query paths | `ShortDocuments` exact schema SPARQL is 41.078 ms / 60.33 MB; local federated schema search is 39.410 ms / 62.31 MB |
1331
+
| Tiktoken search | `LongDocuments` exact token-distance search is 298.1 us / 212.24 KB; typo correction is 391.5 us / 216.30 KB |
1332
+
| Persistence | `LargeCorpus` Turtle file load is 35.708 ms / 28.10 MB; JSON-LD file load is 90.663 ms / 75.32 MB |
1333
+
| Lifecycle | Build/search/save/load/export is 55.35 ms / 54.44 MB |
1334
+
| Fuzzy edit distance | Long insertion is 376.58x faster than naive Levenshtein; long no-match is 172.88x faster, both with 0 B allocated |
1335
+
1336
+
These numbers are local diagnostics, not a cross-machine performance contract. The full Markdown, CSV, and JSON BenchmarkDotNet reports remain the source for raw measurements.
0 commit comments