InCerryGit opened a new pull request, #334:
URL: https://github.com/apache/arrow-dotnet/pull/334

   ## Summary
   
   `StringArray.GetString` previously routed through `GetBytes`, which repeated 
bounds/null/offset work before decoding the returned byte span. This PR decodes 
directly from the array's offsets and value buffer while preserving the 
materialized-string fast path.
   
   ## Benchmark
   
   BenchmarkDotNet, `StringArrayGetStringBenchmark`, Count=1024:
   
   | Method | Before | After |
   |---|---:|---:|
   | `GetString` | 23.23 us / 48.08 KB | 18.04 us / 48.08 KB |
   | `GetStringFromSlice` | 23.90 us / 48.00 KB | 18.05 us / 48.00 KB |
   
   ## Validation
   
   - `dotnet format Apache.Arrow.sln --include 
src/Apache.Arrow/Arrays/StringArray.cs 
test/Apache.Arrow.Tests/StringArrayTests.cs 
test/Apache.Arrow.Benchmarks/StringArrayGetStringBenchmark.cs --no-restore`
   - `dotnet test test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj -c Release 
--filter "FullyQualifiedName~Apache.Arrow.Tests.StringArrayTests"`
   - `dotnet build Apache.Arrow.sln -c Release`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to