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

[pdatagen]Introduce method to reslice for pcommon.UInt64Slice #12004

Open
lahsivjar opened this issue Jan 3, 2025 · 0 comments
Open

[pdatagen]Introduce method to reslice for pcommon.UInt64Slice #12004

lahsivjar opened this issue Jan 3, 2025 · 0 comments

Comments

@lahsivjar
Copy link
Member

lahsivjar commented Jan 3, 2025

Is your feature request related to a problem? Please describe.

The current interface exposed by pcommon.UInt64Slice for the underlying slice leads to a lot of allocations for use-cases which deals with datastructure like histograms or exponential histograms. For example, merging two exponential histograms almost always requires a new slice to be allocated even if the conditions are met to allow reusing one of the slices.

Describe the solution you'd like

Probably not the ideal solution but while working on optimizing merges for exponential histograms I wanted to have access to a method that would allow me to reslice the underlying slice - a method like Reslice(lower, upper int) which would basically do slice[lower:upper] on the underlying slice.

I am not aware with all the design intentions for the pdata, so does it make sense to have a Reslice method?

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

No branches or pull requests

1 participant