Skip to content

Conversation

@tlm365
Copy link
Contributor

@tlm365 tlm365 commented Aug 15, 2024

Which issue does this PR close?

Closes #11990.

Rationale for this change

Refactor code and improve performance.

What changes are included in this PR?

repeat function and benchmark.

Are these changes tested?

Yes

Are there any user-facing changes?

No


Benchmark stats on my local machine:

  • AMD Ryzen 5 PRO 5650U (6 cores 12 threads) - 24Gb RAM

2024-08-16_11-31-57

@github-actions github-actions bot added the functions Changes to functions implementation label Aug 15, 2024
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @tlm365 this PR looks promising. Would you mind adding bench results to the PR description?

@tlm365
Copy link
Contributor Author

tlm365 commented Aug 15, 2024

Thanks @tlm365 this PR looks promising. Would you mind adding bench results to the PR description?

@comphead Thanks for reviewing, I have updated it.

tlm365 added 2 commits August 16, 2024 11:34
Signed-off-by: Tai Le Manh <[email protected]>
(Some(_), Some(_)) => Some("".to_string()),
_ => None,
}
.for_each(|(string, number)| match (string, number) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 -- very nice

}
}

pub trait StringArrayType<'a>: ArrayAccessor<Item = &'a str> + Sized {
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense -- thank you @tlm365 and @Omega359 -- I'll make a PR to add some additional comments to this trait as well

Copy link
Contributor

Choose a reason for hiding this comment

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

#12027 is a PR to document this trait and how to use it

@alamb alamb merged commit bb92181 into apache:main Aug 16, 2024
@alamb
Copy link
Contributor

alamb commented Aug 16, 2024

Thank you for the reviews @tlm365 @Omega359 and @comphead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance of REPEAT functions

4 participants