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

Enable using Buffer<T> for Serialize/Deserialize #98

Conversation

emilk
Copy link
Contributor

@emilk emilk commented Feb 10, 2023

Serializing and deserializing a Buffer<T> is much faster than a Vec<T>, as the added benchmark shows:

serialize/Buffer/1000    time:   [669.72 ns 672.49 ns 675.58 ns]
serialize/Vec/1000       time:   [3.2616 µs 3.2665 µs 3.2722 µs]

deserialize/Buffer/10000 time:   [380.00 ns 382.86 ns 385.58 ns]
deserialize/Vec/10000    time:   [6.6530 µs 6.6782 µs 6.7093 µs]

@emilk emilk force-pushed the emilk/impl-serialize-deserialize-for-buffer branch from df7b7fb to ac65e04 Compare February 10, 2023 19:01
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2023

Codecov Report

Merging #98 (24d64e3) into main (82ce45f) will increase coverage by 0.13%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   94.49%   94.63%   +0.13%     
==========================================
  Files           8        8              
  Lines        1526     1565      +39     
==========================================
+ Hits         1442     1481      +39     
  Misses         84       84              
Impacted Files Coverage Δ
arrow2_convert/src/deserialize.rs 100.00% <100.00%> (ø)
arrow2_convert/src/field.rs 100.00% <100.00%> (ø)
arrow2_convert/src/serialize.rs 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@emilk emilk marked this pull request as ready for review February 10, 2023 19:08
@ncpenke
Copy link
Collaborator

ncpenke commented Feb 11, 2023

Thanks @emilk this is great! Only feedback I have is to generalize to include 64-bit offsets. I can do that in a follow up.

@ncpenke ncpenke merged commit a270bb6 into DataEngineeringLabs:main Feb 11, 2023
@emilk
Copy link
Contributor Author

emilk commented Feb 11, 2023

@jondo2010 did all the work, I just opened the PR 😆

Thanks for the quick merge!

Do you think it would be possible to make a release with this before Monday? 😬 Since this isn't a breaking change (afaict), a patch release should be sufficient.

@emilk emilk mentioned this pull request Feb 11, 2023
8 tasks
@emilk emilk deleted the emilk/impl-serialize-deserialize-for-buffer branch February 11, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants