Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Avoided redundant checks in creating an Utf8Array from MutableUtf8Array #560

Merged
merged 1 commit into from
Oct 31, 2021

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Oct 30, 2021

This PR fixes a performance issue when creating Utf8Array from MutableUtf8Array: since MutableUtf8Array has the same invariants as Utf8Array, we can use from_data_unchecked, avoiding re-running expensive utf8 validation.

@jorgecarleitao jorgecarleitao added the enhancement An improvement to an existing feature label Oct 30, 2021
@jorgecarleitao jorgecarleitao changed the title Avoided redundant checks in building an Utf8Array from MutableUtf8Array Avoided redundant checks in creating an Utf8Array from MutableUtf8Array Oct 30, 2021
@codecov
Copy link

codecov bot commented Oct 30, 2021

Codecov Report

Merging #560 (a4a4369) into main (5fc843d) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
- Coverage   78.92%   78.89%   -0.04%     
==========================================
  Files         382      382              
  Lines       24276    24534     +258     
==========================================
+ Hits        19160    19356     +196     
- Misses       5116     5178      +62     
Impacted Files Coverage Δ
src/array/utf8/mutable.rs 85.25% <100.00%> (ø)
src/io/ipc/read/array/union.rs 70.49% <0.00%> (-4.51%) ⬇️
src/array/union/mod.rs 79.27% <0.00%> (-0.34%) ⬇️
tests/it/array/mod.rs 100.00% <0.00%> (ø)
src/array/display.rs 53.47% <0.00%> (+2.37%) ⬆️
src/datatypes/mod.rs 81.65% <0.00%> (+4.03%) ⬆️
src/io/avro/read/mod.rs 86.95% <0.00%> (+4.60%) ⬆️
src/io/json_integration/schema.rs 51.65% <0.00%> (+5.59%) ⬆️
src/io/ipc/read/array/fixed_size_binary.rs 57.69% <0.00%> (+10.07%) ⬆️

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 5fc843d...a4a4369. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant