diff --git a/src/benchmarks/Tiktoken.Benchmarks/Benchmarks.cs b/src/benchmarks/Tiktoken.Benchmarks/Benchmarks.cs index 60c50a2..f096ccd 100644 --- a/src/benchmarks/Tiktoken.Benchmarks/Benchmarks.cs +++ b/src/benchmarks/Tiktoken.Benchmarks/Benchmarks.cs @@ -41,7 +41,7 @@ public async Task GlobalSetup() [Benchmark] [BenchmarkCategory("Encode")] - public IReadOnlyCollection MicrosoftMLTokenizerV1_0_0_Encode() => _microsoftMlTiktoken.EncodeToIds(Data); + public IReadOnlyCollection MicrosoftMLTokenizerV1_0_0_Encode() => _microsoftMlTiktoken.EncodeToIds(Data.AsSpan()); [Benchmark] [BenchmarkCategory("Encode")] @@ -62,7 +62,7 @@ public async Task GlobalSetup() [Benchmark] [BenchmarkCategory("CountTokens")] - public int MicrosoftMLTokenizerV1_0_0_() => _microsoftMlTiktoken.CountTokens(Data); + public int MicrosoftMLTokenizerV1_0_0_() => _microsoftMlTiktoken.CountTokens(Data.AsSpan()); [Benchmark] [BenchmarkCategory("CountTokens")]