You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "InCerryGit (via GitHub)" <gi...@apache.org> on 2026/04/27 01:07:42 UTC
[PR] perf: improve StringArray GetString decoding [arrow-dotnet]
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: improve StringArray GetString decoding [arrow-dotnet]
Posted by "InCerryGit (via GitHub)" <gi...@apache.org>.
InCerryGit commented on PR #334:
URL: https://github.com/apache/arrow-dotnet/pull/334#issuecomment-4323925289
> Thanks! Can you please resolve the merge conflict?
done.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: improve StringArray GetString decoding [arrow-dotnet]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher merged PR #334:
URL: https://github.com/apache/arrow-dotnet/pull/334
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org