Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate ByteArray::from_iterator #4386

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Jun 8, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

Reduces code duplication, and is marginally faster for smaller arrays (likely because of StringBuilder has a minimum allocation of 1024 bytes).

array_string_from_vec 128
                        time:   [945.97 ns 946.65 ns 947.40 ns]
                        change: [-19.195% -19.061% -18.890%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 14 outliers among 100 measurements (14.00%)
  4 (4.00%) low mild
  6 (6.00%) high mild
  4 (4.00%) high severe

array_string_from_vec 256
                        time:   [1.6194 µs 1.6204 µs 1.6215 µs]
                        change: [-4.5788% -4.4338% -4.2716%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) low mild
  1 (1.00%) high mild
  2 (2.00%) high severe

array_string_from_vec 512
                        time:   [2.7773 µs 2.7785 µs 2.7799 µs]
                        change: [-0.1694% -0.0183% +0.1938%] (p = 0.87 > 0.05)
                        No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
  7 (7.00%) high mild
  2 (2.00%) high severe

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jun 8, 2023
Copy link
Member

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification!

@tustvold tustvold merged commit 2846cde into apache:master Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants