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

Use Vec::from_iter in Buffer::from_iter #5460

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

Kikkon
Copy link
Contributor

@Kikkon Kikkon commented Mar 3, 2024

Which issue does this PR close?

Closes #4937 .

Rationale for this change

What changes are included in this PR?

Replace unsafe code with Vec::from_iter in Buffer::from_iter for improved safety and performance

Are there any user-facing changes?

no

@github-actions github-actions bot added the arrow Changes to the arrow crate label Mar 3, 2024
@tustvold
Copy link
Contributor

tustvold commented Mar 3, 2024

Have you run any benchmarks to confirm this doesn't regress performance. The arithmetic kernels might be a good candidate

@Kikkon
Copy link
Contributor Author

Kikkon commented Mar 4, 2024

@tustvold Thanks for your advice, I will first change it to the draft status. I will reopen it after I have finished supplementing the benchmark.

@Kikkon Kikkon marked this pull request as draft March 4, 2024 05:02
@Kikkon
Copy link
Contributor Author

Kikkon commented Mar 5, 2024

Hi @tustvold ,
After comparing with the baseline on the master branch, it appears that this change has no impact on performance. If there are no other concerns, perhaps it's ready for merging. By the way, are there any other issues suitable for newcomers? I think I might not be very familiar with this area yet. (:

@Kikkon Kikkon marked this pull request as ready for review March 5, 2024 15:26
@tustvold tustvold changed the title Enhancement: Replace unsafe code Use Vec::from_iter in Buffer::from_iter Mar 6, 2024
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

I did a scan of this and it turns out we don't use this code for anything other than tests anymore, instead preferring either the trusted length or unary/binary methods

any other issues suitable for newcomers?

#5445 should be straightforward

@tustvold tustvold merged commit ace6d90 into apache:master Mar 6, 2024
26 checks passed
@Kikkon Kikkon deleted the fix/vec_from_iter branch March 9, 2024 15:48
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.

Consider Vec::from_iter in Buffer::from_iter
2 participants