Skip to content

GH-41349: [C#] Optimize DecimalUtility.GetBytes(SqlDecimal) on .NET 7+#42150

Merged
CurtHagenlocher merged 1 commit intoapache:mainfrom
CurtHagenlocher:GH-41349-Take2
Jun 14, 2024
Merged

GH-41349: [C#] Optimize DecimalUtility.GetBytes(SqlDecimal) on .NET 7+#42150
CurtHagenlocher merged 1 commit intoapache:mainfrom
CurtHagenlocher:GH-41349-Take2

Conversation

@CurtHagenlocher
Copy link
Copy Markdown
Contributor

@CurtHagenlocher CurtHagenlocher commented Jun 14, 2024

What changes are included in this PR?

Adds code to avoid an allocation when converting from SqlDecimal to Decimal128.
Adds a .NET 8 target to Apache.Arrow.csproj to enable the optimization.
Makes a small source change to build successfully with latest C# version.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Closes #41349

…ecimal128.

Adds a .NET 8 target to Apache.Arrow.csproj to enable the optimization.
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit a7a46b2.

There were 4 benchmark results indicating a performance regression:

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C#] use SqlDecimal.WriteTdsValue for .NET 7+ to avoid allocating a byte[] array

1 participant