Skip to content
New issue

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

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

Already on GitHub? # to your account

Drop unsafe code from truncate_old_buffer() #32

Merged
merged 3 commits into from
Jun 24, 2019

Conversation

Shnatsel
Copy link
Contributor

This has no measurable performance difference. flate-bench was too noisy, so I've used hyperfine to measure it:

hyperfine --min-runs=25 --warmup=3 'target/release/examples/flate -i enwiki-latest-all-titles-in-ns0.gz -o /dev/null gzip-decode'

This also does not regress rustc version compatibility because ptr::add has been added in 1.26 while slice::split_at_mut has been around since 1.0 and slice::copy_from_slice since 1.9

Shnatsel added 3 commits June 20, 2019 14:16
This has no measurable performance difference. This also improves rustc version compatibility because ptr::add has been added in 1.26 while slice::split_at_mut has been around since 1.0 and slice::copy_from_slice since 1.9
@codecov-io
Copy link

codecov-io commented Jun 20, 2019

Codecov Report

Merging #32 into master will increase coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
+ Coverage   91.42%   91.46%   +0.03%     
==========================================
  Files          14       14              
  Lines        1295     1301       +6     
==========================================
+ Hits         1184     1190       +6     
  Misses        111      111
Impacted Files Coverage Δ
src/non_blocking/deflate/decode.rs 86.85% <0%> (+0.07%) ⬆️
src/deflate/encode.rs 96.62% <0%> (+0.02%) ⬆️
src/deflate/symbol.rs 93.06% <0%> (+0.02%) ⬆️
src/huffman.rs 94.02% <0%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f565d3...b468c0e. Read the comment docs.

Copy link
Owner

@sile sile left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@sile sile merged commit 08831ca into sile:master Jun 24, 2019
@Shnatsel Shnatsel deleted the drop-unsafe-from-truncation branch June 24, 2019 14:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants