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

Extend Accumulate...() with a predictive meas. vector resize #20

Open
2 tasks
xparq opened this issue Oct 6, 2023 · 0 comments
Open
2 tasks

Extend Accumulate...() with a predictive meas. vector resize #20

xparq opened this issue Oct 6, 2023 · 0 comments

Comments

@xparq
Copy link
Owner

xparq commented Oct 6, 2023

...so that adding new measurement items during the sampling phase won't actually trigger reallocation (in most cases).

  • The recommended looping pattern of IPROF_SYNC calls lets the first loop cycle "break new ground" and record how many measurements have been made, then (after the actual syncing), that std::swap(measurements, unfinished); could be extended with a preallocation step for the new measurements instance.

  • Evaluate if that unfinished vector, recreated on every call, could just be thread_local instead!

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