diff --git a/Jint.Benchmark/StringSliceBenchmarks.cs b/Jint.Benchmark/StringSliceBenchmarks.cs index 2c45d9064..382ab52b0 100644 --- a/Jint.Benchmark/StringSliceBenchmarks.cs +++ b/Jint.Benchmark/StringSliceBenchmarks.cs @@ -11,6 +11,9 @@ namespace Jint.Benchmark; /// previously fell below the zero-copy retention guard and copied on every call. /// SliceSmall guards the small-result path; SliceThenRead guards lazy-materialization cost /// when the result is actually consumed. +/// SearchOnSlice exercises indexOf/startsWith/endsWith/includes on a fresh large slice each +/// iteration — the case where the inherited base search methods materialize the whole substring +/// on every call. With zero-copy span search overrides this drops to ~0 allocation. /// [MemoryDiagnoser] [HideColumns("Error", "Gen0", "Gen1", "Gen2")] @@ -21,6 +24,8 @@ public class StringSliceBenchmarks private Prepared