-
Notifications
You must be signed in to change notification settings - Fork 784
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
Faster BinaryArray to StringArray conversion (~67%) #3168
Faster BinaryArray to StringArray conversion (~67%) #3168
Conversation
9c133c2
to
ae3ba7b
Compare
ae3ba7b
to
5598db0
Compare
let builder = v.into_data().into_builder().data_type(Self::DATA_TYPE); | ||
Self::from(builder.build().unwrap()) | ||
// SAFETY: | ||
// Validated UTF-8 above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
How much performance improvement can we get?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
byte_array_to_string_array 20000
time: [13.252 µs 13.254 µs 13.257 µs]
change: [-67.094% -67.073% -67.049%] (p = 0.00 < 0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) high mild
6 (6.00%) high severe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faster ByteArray to StringArray conversion
You mean from BinaryArray to StringArray?
let builder = v.into_data().into_builder().data_type(Self::DATA_TYPE); | ||
Self::from(builder.build().unwrap()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it basically remove full validation cost?
for offset in offsets.iter() { | ||
assert!(validated.is_char_boundary(offset.as_usize())) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to exclude last offset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in case the string is sliced
Benchmark runs are scheduled for baseline = 1d22fe3 and contender = 8ba7842. 8ba7842 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?